Module Float

A collection of operations on floating point numbers.

Summary of exported operations:

pi :: Float   
The number pi.
(+.) :: Float -> Float -> Float   
Addition on floats.
(-.) :: Float -> Float -> Float   
Subtraction on floats.
(*.) :: Float -> Float -> Float   
Multiplication on floats.
(/.) :: Float -> Float -> Float   
Division on floats.
(^.) :: Float -> Int -> Float   
The value of `a ^.
i2f :: Int -> Float   
Conversion function from integers to floats.
truncate :: Float -> Int   
Conversion function from floats to integers.
round :: Float -> Int   
Conversion function from floats to integers.
recip :: Float -> Float   
Reciprocal
sqrt :: Float -> Float   
Square root.
log :: Float -> Float   
Natural logarithm.
logBase :: Float -> Float -> Float   
Logarithm to arbitrary Base.
exp :: Float -> Float   
Natural exponent.
sin :: Float -> Float   
Sine.
cos :: Float -> Float   
Cosine.
tan :: Float -> Float   
Tangent.
asin :: Float -> Float   
Arc sine.
acos :: Float -> Float   
atan :: Float -> Float   
Arc tangent.
sinh :: Float -> Float   
Hyperbolic sine.
cosh :: Float -> Float   
tanh :: Float -> Float   
Hyperbolic tangent.
asinh :: Float -> Float   
Hyperbolic Arc sine.
acosh :: Float -> Float   
atanh :: Float -> Float   
Hyperbolic Arc tangent.

Exported operations:

pi :: Float   

The number pi.

Further infos:
  • solution complete, i.e., able to compute all solutions

(+.) :: Float -> Float -> Float   

Addition on floats.

Further infos:
  • defined as left-associative infix operator with precedence 6

(-.) :: Float -> Float -> Float   

Subtraction on floats.

Further infos:
  • defined as left-associative infix operator with precedence 6

(*.) :: Float -> Float -> Float   

Multiplication on floats.

Further infos:
  • defined as left-associative infix operator with precedence 7

(/.) :: Float -> Float -> Float   

Division on floats.

Further infos:
  • defined as left-associative infix operator with precedence 7

(^.) :: Float -> Int -> Float   

The value of a ^. b is a raised to the power of b. Executes in O(log b) steps.

Example call:
(a ^. b)
Parameters:
  • a : The base.
  • b : The exponent.
Returns:
a raised to the power of b.
Further infos:
  • defined as right-associative infix operator with precedence 8

i2f :: Int -> Float   

Conversion function from integers to floats.

truncate :: Float -> Int   

Conversion function from floats to integers. The result is the closest integer between the argument and 0.

round :: Float -> Int   

Conversion function from floats to integers. The result is the nearest integer to the argument. If the argument is equidistant between two integers, it is rounded to the closest even integer value.

recip :: Float -> Float   

Reciprocal

sqrt :: Float -> Float   

Square root.

log :: Float -> Float   

Natural logarithm.

logBase :: Float -> Float -> Float   

Logarithm to arbitrary Base.

exp :: Float -> Float   

Natural exponent.

sin :: Float -> Float   

Sine.

cos :: Float -> Float   

Cosine.

tan :: Float -> Float   

Tangent.

asin :: Float -> Float   

Arc sine.

acos :: Float -> Float   

atan :: Float -> Float   

Arc tangent.

sinh :: Float -> Float   

Hyperbolic sine.

cosh :: Float -> Float   

tanh :: Float -> Float   

Hyperbolic tangent.

asinh :: Float -> Float   

Hyperbolic Arc sine.

acosh :: Float -> Float   

atanh :: Float -> Float   

Hyperbolic Arc tangent.