Copyright | (c) George Ungureanu KTH/ICT/ESY 2017 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | ugeorge@kth.se |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Collection of utility functions for working with Time
. While the
CT
MoC describes time as being a non-disjoint
continuum (represented in ForSyDe-Atom with Rational
numbers),
most of the functions here are non-ideal approximations or
conversions from floating point equivalents. The trigonometric
functions are imported from the
numbers
package, with a fixed eps
parameter.
These utilities are meant to get started with using the CT MoC, and
should be used with caution if result fidelity is a requirement. In
this case the user should find a native Rational
implementation
for a particular function.
Synopsis
- type Time = Rational
- time :: TimeStamp -> Time
- const :: a -> Time -> a
- e :: Time
- (*^*) :: Time -> Time -> Time
- pi :: Time
- sin :: Time -> Time
- cos :: Time -> Time
- tan :: Time -> Time
- atan :: Time -> Time
- asin :: Time -> Time
- acos :: Time -> Time
- sqrt :: Time -> Time
- exp :: Time -> Time
- cosh :: Time -> Time
- sinh :: Time -> Time
- tanh :: Time -> Time
- atanh :: Time -> Time
- asinh :: Time -> Time
- acosh :: Time -> Time
- log :: Time -> Time
Documentation
Type alias for the type to represent metric (continuous)
time. Underneath we use Rational
that is able to represent any
\(t\) between \(t_1 < t_2 \in T\).
Time
representation of the number π. Rational
representation with a precision of 0.000001
.
Arctangent of Time
. Rational representation with a precision
of 0.000001
.
Arccosine of Time
. Rational representation with a precision
of 0.000001
.
Square root of Time
. Rational representation with a precision
of 0.000001
.
Hyperbolic cosine of Time
. Rational representation with a
precision of 0.000001
.
Hyperbolic sine of Time
. Rational representation with a
precision of 0.000001
.
Hyperbolic tangent of Time
. Rational representation with a
precision of 0.000001
.
atanh :: Time -> Time Source #
Hyperbolic arctangent of Time
. Rational representation with a
precision of 0.000001
.
asinh :: Time -> Time Source #
Hyperbolic arcsine of Time
. Rational representation with a
precision of 0.000001
.