Package

algebra

number

Permalink

package number

Visibility
  1. Public
  2. All

Type Members

  1. trait IsIntegral[A] extends IsReal[A]

    Permalink
  2. trait IsReal[A] extends Order[A] with Signed[A]

    Permalink

    A simple type class for numeric types that are a subset of the reals.

  3. trait IsRealFunctions extends AnyRef

    Permalink
  4. trait NRoot[A] extends AnyRef

    Permalink

    This is a type class for types with n-roots.

    This is a type class for types with n-roots.

    For many types, the value returned by nroot and sqrt are only guaranteed to be approximate answers. Thus, many (most?) instances of NRoot will not be able to ensure that sqrt(x) * sqrt(x) = x.

    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!

  5. trait NRootFunctions extends AnyRef

    Permalink
  6. sealed abstract class Sign extends AnyRef

    Permalink

    A simple ADT representing the Sign of an object.

  7. trait Signed[A] extends Any

    Permalink

    A trait for things that have some notion of sign and the ability to ensure something has a non-negative sign.

  8. trait SignedFunctions extends AnyRef

    Permalink

Value Members

  1. object IsReal extends IsRealFunctions with Serializable

    Permalink
  2. object NRoot extends NRootFunctions

    Permalink
  3. object Sign

    Permalink
  4. object Signed extends SignedFunctions

    Permalink

Ungrouped