Trait/Object

spire.algebra

NRoot

Related Docs: object NRoot | package algebra

Permalink

trait NRoot[A] extends Any

This is a type class for types with n-roots. The value returned by nroot and sqrt are only guaranteed to be approximate answers (except in the case of Real).

Also, generally nroots where n is even are not defined for negative numbers. The behaviour is undefined if this is attempted. It would be nice to ensure an exception is raised, but some types may defer computation and testing if a value is negative may not be ideal. So, do not count on ArithmeticExceptions to save you from bad arithmetic!

Linear Supertypes
Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NRoot
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def fpow(a: A, b: A): A

    Permalink
  2. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  3. abstract def nroot(a: A, n: Int): A

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. def sqrt(a: A): A

    Permalink
  9. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from Any

Ungrouped