Ludwig.Float

Module Members

add

(Function)

Type Signature

 fun (Float, Float) -> Float
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Float

ceiling

(Function)

Ludwig.Float to Ludwig.Int conversion. See also floor.

Type Signature

 fun (Float) -> Int
Argument: x
Type: Float
Returns:
Type: Int

div

(Function)

Type Signature

 fun (Float, Float) -> Float
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Float

eq

(Function)

Type Signature

 fun (Float, Float) -> Bool
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Bool

floor

(Function)

Ludwig.Float to Ludwig.Int conversion. See also ceiling.

Type Signature

 fun (Float) -> Int
Argument: x
Type: Float
Returns:
Type: Int

gt

(Function)

Type Signature

 fun (Float, Float) -> Bool
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Bool

gte

(Function)

Type Signature

 fun (Float, Float) -> Bool
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Bool

intToFloat

(Function)

Ludwig.Int to Ludwig.Float conversion

Type Signature

 fun (Int) -> Float
Argument: x
Type: Int
Returns:
Type: Float

lt

(Function)

Type Signature

 fun (Float, Float) -> Bool
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Bool

lte

(Function)

Type Signature

 fun (Float, Float) -> Bool
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Bool

mul

(Function)

Type Signature

 fun (Float, Float) -> Float
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Float

negate

(Function)

Negate an Ludwig.Float.

Note that this is currently the only way to specify a negative literal.

Example:

negative1: negate(1)           # => -1
positive1: negate(negative1)   # => 1

Type Signature

 fun (Float) -> Float
Argument: x
Type: Float
Returns:
Type: Float

neq

(Function)

Type Signature

 fun (Float, Float) -> Bool
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Bool

pow

(Function)

Type Signature

 fun (Float, Float) -> Float
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Float

round

(Function)

Ludwig.Float to Ludwig.Int conversion by rounding.

Type Signature

 fun (Float) -> Int
Argument: x
Type: Float
Returns:
Type: Int

sub

(Function)

Type Signature

 fun (Float, Float) -> Float
Argument: x
Type: Float
Argument: y
Type: Float
Returns:
Type: Float

(Operator)

operator !=. infixl 4:
  neq

Inequality operator for Ludwig.Floats.

(Operator)

operator *. infixl 7:
  mul

Multiplication operator for Ludwig.Floats.

(Operator)

operator +. infixl 6:
  add

Addition operator for Ludwig.Floats.

(Operator)

operator -. infixl 6:
  sub

Subtraction operator for Ludwig.Floats.

(Operator)

operator /. infixl 7:
  div

Division operator for Ludwig.Floats.

(Operator)

operator <. infixl 4:
  lt

Less than operator for Ludwig.Floats.

(Operator)

operator <=. infixl 4:
  lte

Less than or equal operator for Ludwig.Floats.

(Operator)

operator ==. infixl 4:
  eq

Equality operator for Ludwig.Floats.

(Operator)

operator >. infixl 4:
  gt

Greater than operator for Ludwig.Floats.

(Operator)

operator >=. infixl 4:
  gte

Greater than or equal operator for Ludwig.Floats.

(Operator)

operator ^. infixr 8:
  pow

Exponent operator for Ludwig.Floats.