Functions | |
| void | build (flash x, int(*gen)(_MIPT_ big, int)) |
| void | dconv (double d, flash w) |
| void | denom (flash x, big y) |
| void | facos (flash x, flash y) |
| void | facosh (flash x, flash y) |
| void | fadd (flash x, flash y, flash z) |
| void | fasin (flash x, flash y) |
| void | fasinh (flash x, flash y) |
| void | fatan (flash x, flash y) |
| void | fatanh (flash x, flash y) |
| int | fcomp (flash x, flash y) |
| void | fconv (int n, int d, flash x) |
| void | fcos (flash x, flash y) |
| void | fcosh (flash x, flash y) |
| void | fdiv (flash x, flash y, flash z) |
| double | fdsize (flash w) |
| void | fexp (flash x, flash y) |
| void | fincr (flash x, int n, int d, flash y) |
| void | flog (flash x, flash y) |
| void | flop (flash x, flash y, int *op, flash z) |
| void | fmodulo (flash x, flash y, flash z) |
| void | fmul (flash x, flash y, flash z) |
| void | fpack (big n, big d, flash x) |
| void | fpi (flash pi) |
| void | fpmul (flash x, int n, int d, flash y) |
| void | fpower (flash x, int n, flash w) |
| void | fpowf (flash x, flash y, flash z) |
| void | frand (flash x) |
| void | frecip (flash x, flash y) |
| BOOL | froot (flash x, int n, flash w) |
| void | fsin (flash x, flash y) |
| void | fsinh (flash x, flash y) |
| void | fsub (flash x, flash y, flash z) |
| void | ftan (flash x, flash y) |
| void | ftanh (flash x, flash y) |
| void | ftrunc (flash x, big y, flash z) |
| void | mround (big num, big den, flash z) |
| void | numer (flash x, big y) |
| void build | ( | flash | x, | |
| int(*)(_MIPT_ big, int) | gen | |||
| ) |
Uses supplied generator of regular continued fraction expansion to build up a flash number x, rounded if necessary
| [out] | x | The flash number created |
| [in] | gen | The generator function |
int phi(flash w, int n) { // rcf generator for golden ratio // return 1; } ... build(x, phi); ... // This will calculate the golden ratio (1 + sqrt(5)) / 2 in x -- very quickly!
| void dconv | ( | double | d, | |
| flash | w | |||
| ) |
Converts a double to flash format
| [in] | d | |
| [out] | w | The flash equivalent of d |
| void denom | ( | flash | x, | |
| big | y | |||
| ) |
Extracts the denominator of a flash number
| [in] | x | |
| [out] | y | The denominator of x |
| void facos | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates arc-cosine of a flash number, using fasin()
| [in] | x | |
| [out] | y | = arccos(x) |
| void facosh | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates hyperbolic arc-cosine of a flash number
| [in] | x | |
| [out] | y | = arccosh(x) |
| void fadd | ( | flash | x, | |
| flash | y, | |||
| flash | z | |||
| ) |
Adds two flash numbers
| [in] | x | |
| [in] | y | |
| [out] | z | = |
| void fasin | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates arc-sin of a flash number, using fatan()
| [in] | x | |
| [out] | y | = arcsin(x) |
| void fasinh | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates hyperbolic arc-sin of a flash number
| [in] | x | |
| [out] | y | = arcsinh(x) |
| void fatan | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates the arc-tangent of a flash number, using an
method based on Newton's iteration
| [in] | x | |
| [out] | y | = arctan(x) |
| void fatanh | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates the hyperbolic arc-tangent of a flash number
| [in] | x | |
| [out] | y | = arctanh(x) |
must be less than 1 | int fcomp | ( | flash | x, | |
| flash | y | |||
| ) |
Compares two flash numbers
| [in] | x | |
| [in] | y |
| void fconv | ( | int | n, | |
| int | d, | |||
| flash | x | |||
| ) |
Converts a simple fraction to flash format
| [in] | n | |
| [in] | d | |
| [out] | x | = |
| void fcos | ( | flash | x, | |
| flash | y | |||
| ) |
| void fcosh | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates hyperbolic cosine of a given flash angle
| [in] | x | |
| [out] | y | = cosh(x) |
| void fdiv | ( | flash | x, | |
| flash | y, | |||
| flash | z | |||
| ) |
Divides two flash numbers
| [in] | x | |
| [in] | y | |
| [out] | z | = |
| double fdsize | ( | flash | w | ) |
Converts a flash number to double format
| [in] | w |
double double | void fexp | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates the exponential of a flash number using
method
| [in] | x | |
| [out] | y | = |
| void fincr | ( | flash | x, | |
| int | n, | |||
| int | d, | |||
| flash | y | |||
| ) |
Add a simple fraction to a flash number
| [in] | x | |
| [in] | n | |
| [in] | d | |
| [out] | y | = ![]() |
// This subtracts two-thirds from the value of x fincr(x, -2, 3, x);
| void flog | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates the natural log of a flash number using
method
| [in] | x | |
| [out] | y | = log(x) |
| void flop | ( | flash | x, | |
| flash | y, | |||
| int * | op, | |||
| flash | z | |||
| ) |
Performs primitive flash operation. Used internally. See source listing comments for more details
| [in] | x | |
| [in] | y | |
| [in] | op | |
| [out] | z | = Fn(x,y), where the function performed depends on the parameter op |
| void fmodulo | ( | flash | x, | |
| flash | y, | |||
| flash | z | |||
| ) |
Finds the remainder when one flash number is divided by another
| [in] | x | |
| [in] | y | |
| [out] | z | = |
| void fmul | ( | flash | x, | |
| flash | y, | |||
| flash | z | |||
| ) |
Multiplies two flash numbers
| [in] | x | |
| [in] | y | |
| [out] | z | = xy |
| void fpack | ( | big | n, | |
| big | d, | |||
| flash | x | |||
| ) |
Forms a flash number from big numerator and denominator
| [in] | n | |
| [in] | d | |
| [out] | x | = |
| void fpi | ( | flash | pi | ) |
Calculates
using Gauss-Legendre
method. Note that on subsequent calls to this routine,
is immediately available, as it is stored internally. (This routine is disappointingly slow. There appears to be no simple way to calculate a rational approximation to
quickly)
| [out] | pi | = |
| void fpmul | ( | flash | x, | |
| int | n, | |||
| int | d, | |||
| flash | y | |||
| ) |
Multiplies a flash number by a simple fraction
| [in] | x | |
| [in] | n | |
| [in] | d | |
| [out] | y | = |
| void fpower | ( | flash | x, | |
| int | n, | |||
| flash | w | |||
| ) |
Raises a flash number to an integer power
| [in] | x | |
| [in] | n | |
| [out] | w | = |
| void fpowf | ( | flash | x, | |
| flash | y, | |||
| flash | z | |||
| ) |
Raises a flash number to a flash power
| [in] | x | |
| [in] | y | |
| [out] | z | = |
| void frand | ( | flash | x | ) |
Generates a random flash number
| [out] | x | A flash random number in the range 0 < x < 1 |
| void frecip | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates reciprocal of a flash number
| [in] | x | |
| [out] | y | = |
| BOOL froot | ( | flash | x, | |
| int | n, | |||
| flash | w | |||
| ) |
Calculates n-th root of a flash number using Newton's
method
| [in] | x | |
| [in] | n | |
| [out] | w | = |
TRUE for exact root, otherwise FALSE | void fsin | ( | flash | x, | |
| flash | y | |||
| ) |
| void fsinh | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates hyperbolic sine of a given flash angle
| [in] | x | |
| [out] | y | = sinh(x) |
| void fsub | ( | flash | x, | |
| flash | y, | |||
| flash | z | |||
| ) |
Subtracts two flash numbers
| [in] | x | |
| [in] | y | |
| [out] | z | = |
| void ftan | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates the tan of a given flash angle, using an
method
| [in] | x | |
| [out] | y | = tan(x) |
| void ftanh | ( | flash | x, | |
| flash | y | |||
| ) |
Calculates the hyperbolic tan of a given flash angle
| [in] | x | |
| [out] | y | = tanh(x) |
| void ftrunc | ( | flash | x, | |
| big | y, | |||
| flash | z | |||
| ) |
Separates a flash number to a big number and a flash remainder
| [in] | x | |
| [out] | y | = int(x) |
| [out] | z | The fractional remainder. If y is the same as z, only int(x) is returned |
| void mround | ( | big | num, | |
| big | den, | |||
| flash | z | |||
| ) |
Forms a rounded flash number from big numerator and denominator. If rounding takes place the instance variable EXACT is set to FALSE. EXACT Is initialised to TRUE in routine mirsys(). This routine is used internally
| [in] | num | |
| [in] | den | |
| [out] | z | = --- the flash number is rounded if necessary to fit the representation |
| void numer | ( | flash | x, | |
| big | y | |||
| ) |
Extracts the numerator of a flash number
| [in] | x | |
| [out] | y | the numerator of x |