Mathematics

Mathematics

Functions

double acosh ()
double asinh ()
double atanh ()
double expm1 ()
long double frexpl ()
double go_add_epsilon ()
long double go_add_epsilonl ()
_Decimal64 go_add_epsilonD ()
double go_ascii_strtod ()
long double go_ascii_strtold ()
_Decimal64 go_ascii_strtoDd ()
double go_atan2pi ()
long double go_atan2pil ()
_Decimal64 go_atan2piD ()
double go_atanpi ()
long double go_atanpil ()
_Decimal64 go_atanpiD ()
void go_continued_fraction ()
double go_cospi ()
long double go_cospil ()
_Decimal64 go_cospiD ()
double go_cotpi ()
long double go_cotpil ()
_Decimal64 go_cotpiD ()
void go_dtoa ()
double go_fake_ceil ()
long double go_fake_ceill ()
_Decimal64 go_fake_ceilD ()
double go_fake_floor ()
long double go_fake_floorl ()
_Decimal64 go_fake_floorD ()
double go_fake_round ()
long double go_fake_roundl ()
_Decimal64 go_fake_roundD ()
double go_fake_trunc ()
long double go_fake_truncl ()
_Decimal64 go_fake_truncD ()
int go_finite ()
int go_finitel ()
int go_finiteD ()
long double go_log10l ()
_Decimal64 go_log10D ()
double go_pow ()
long double go_powl ()
_Decimal64 go_powD ()
double go_pow10 ()
long double go_pow10l ()
_Decimal64 go_pow10D ()
double go_pow2 ()
long double go_pow2l ()
_Decimal64 go_pow2D ()
double go_rint ()
void go_stern_brocot ()
double go_strtod ()
long double go_strtold ()
_Decimal64 go_strtoDd ()
double go_sub_epsilon ()
long double go_sub_epsilonl ()
_Decimal64 go_sub_epsilonD ()
long double ldexpl ()
double log1p ()
long double modfl ()
long double strtold ()

Description

Functions

acosh ()

double
acosh (double x);

asinh ()

double
asinh (double x);

atanh ()

double
atanh (double x);

expm1 ()

double
expm1 (double x);

frexpl ()

long double
frexpl (long double x,
        int *e);

go_add_epsilon ()

double
go_add_epsilon (double x);

Parameters

x

a number

 

Returns

the next-larger representable value, except that zero and infinites are returned unchanged.


go_add_epsilonl ()

long double
go_add_epsilonl (long double x);

Parameters

x

a number

 

Returns

the next-larger representable value, except that zero and infinites are returned unchanged.


go_add_epsilonD ()

_Decimal64
go_add_epsilonD (_Decimal64 x);

Parameters

x

a number

 

Returns

the next-larger representable value, except that zero and infinites are returned unchanged.


go_ascii_strtod ()

double
go_ascii_strtod (const char *s,
                 char **end);

Like g_ascii_strtod, but without hex notation and MS extensions. There is no need to reset errno before calling this.

Parameters

s

string to convert

 

end

optional pointer to end of string.

 

go_ascii_strtold ()

long double
go_ascii_strtold (const char *s,
                  char **end);

Like strtold, but without hex notation and MS extensions and also assuming "C" locale. Unlike strtold, there is no need to reset errno before calling this.

Parameters

s

string to convert

 

end

optional pointer to end of string.

 

go_ascii_strtoDd ()

_Decimal64
go_ascii_strtoDd (const char *s,
                  char **end);

Like strtoDd, but applying "C" locale and without hex notation and MS extensions. Unlike strtod, there is no need to reset errno before calling this.

Parameters

s

string to convert

 

end

optional pointer to end of string.

 

go_atan2pi ()

double
go_atan2pi (double y,
            double x);

Parameters

y

a number

 

x

a number

 

Returns

the polar angle of the point (x ,y ) in radians divided by Pi. The result is a number between -1 and +1.


go_atan2pil ()

long double
go_atan2pil (long double y,
             long double x);

Parameters

y

a number

 

x

a number

 

Returns

the polar angle of the point (x ,y ) in radians divided by Pi. The result is a number between -1 and +1.


go_atan2piD ()

_Decimal64
go_atan2piD (_Decimal64 y,
             _Decimal64 x);

Parameters

y

a number

 

x

a number

 

Returns

the polar angle of the point (x ,y ) in radians divided by Pi. The result is a number between -1 and +1.


go_atanpi ()

double
go_atanpi (double x);

Parameters

x

a number

 

Returns

the arc tangent of x in radians divided by Pi. The result is a number between -1 and +1.


go_atanpil ()

long double
go_atanpil (long double x);

Parameters

x

a number

 

Returns

the arc tangent of x in radians divided by Pi. The result is a number between -1 and +1.


go_atanpiD ()

_Decimal64
go_atanpiD (_Decimal64 x);

Parameters

x

a number

 

Returns

the arc tangent of x in radians divided by Pi. The result is a number between -1 and +1.


go_continued_fraction ()

void
go_continued_fraction (double val,
                       int max_denom,
                       int *res_num,
                       int *res_denom);

go_cospi ()

double
go_cospi (double x);

Parameters

x

a number

 

Returns

the cosine of Pi times x , but with less error than doing the multiplication outright.


go_cospil ()

long double
go_cospil (long double x);

Parameters

x

a number

 

Returns

the cosine of Pi times x , but with less error than doing the multiplication outright.


go_cospiD ()

_Decimal64
go_cospiD (_Decimal64 x);

Parameters

x

a number

 

Returns

the cosine of Pi times x , but with less error than doing the multiplication outright.


go_cotpi ()

double
go_cotpi (double x);

Parameters

x

a number

 

Returns

the cotangent of Pi times x , but with less error than doing the multiplication outright.


go_cotpil ()

long double
go_cotpil (long double x);

Parameters

x

a number

 

Returns

the cotangent of Pi times x , but with less error than doing the multiplication outright.


go_cotpiD ()

_Decimal64
go_cotpiD (_Decimal64 x);

Parameters

x

a number

 

Returns

the cotangent of Pi times x , but with less error than doing the multiplication outright.


go_dtoa ()

void
go_dtoa (GString *dst,
         const char *fmt,
         ...);

Formats a single floating-point value. format should be a printf-style format fragment for a single floating-point item without the initial '%'.

If goffice has been compiled with support for type "long double", an "L" modifier can be used. If goffice has been compiled with support for type "decimal64", a "D" modifier can be used.

'*' for width and/or precision are allowed and consume an extra int argument

Certain extra flags are supported: flag '!' means to use the shortest possible representation of the number; flag '=' means to clear the dst before formatting (as opposed to appending); flag ',' means to format as in C locale

Parameters

dst

destination

 

fmt

format

 

...

single value to format (but see below)

 

go_fake_ceil ()

double
go_fake_ceil (double x);

Parameters

x

value to ceil

 

Returns

the ceiling of x , ie., the smallest integer that is not smaller than x . However, this variant applies a 1 ulp grace interval for values that are just a hair larger than an integer.


go_fake_ceill ()

long double
go_fake_ceill (long double x);

Parameters

x

value to ceil

 

Returns

the ceiling of x , ie., the smallest integer that is not smaller than x . However, this variant applies a 1 ulp grace interval for values that are just a hair larger than an integer.


go_fake_ceilD ()

_Decimal64
go_fake_ceilD (_Decimal64 x);

Parameters

x

value to ceil

 

Returns

the ceiling of x , ie., the smallest integer that is not smaller than x . However, this variant applies a 1 ulp grace interval for values that are just a hair larger than an integer.


go_fake_floor ()

double
go_fake_floor (double x);

Parameters

x

value to floor

 

Returns

the floor of x , ie., the largest integer that is not larger than x . However, this variant applies a 1 ulp grace interval for values that are just a hair less than an integer.


go_fake_floorl ()

long double
go_fake_floorl (long double x);

Parameters

x

value to floor

 

Returns

the floor of x , ie., the largest integer that is not larger than x . However, this variant applies a 1 ulp grace interval for values that are just a hair less than an integer.


go_fake_floorD ()

_Decimal64
go_fake_floorD (_Decimal64 x);

Parameters

x

value to floor

 

Returns

the floor of x , ie., the largest integer that is not larger than x . However, this variant applies a 1 ulp grace interval for values that are just a hair less than an integer.


go_fake_round ()

double
go_fake_round (double x);

go_fake_roundl ()

long double
go_fake_roundl (long double x);

go_fake_roundD ()

_Decimal64
go_fake_roundD (_Decimal64 x);

go_fake_trunc ()

double
go_fake_trunc (double x);

go_fake_truncl ()

long double
go_fake_truncl (long double x);

go_fake_truncD ()

_Decimal64
go_fake_truncD (_Decimal64 x);

go_finite ()

int
go_finite (double x);

go_finitel ()

int
go_finitel (long double x);

go_finiteD ()

int
go_finiteD (_Decimal64 x);

go_log10l ()

long double
go_log10l (long double x);

go_log10D ()

_Decimal64
go_log10D (_Decimal64 x);

go_pow ()

double
go_pow (double x,
        double y);

go_powl ()

long double
go_powl (long double x,
         long double y);

go_powD ()

_Decimal64
go_powD (_Decimal64 x,
         _Decimal64 y);

go_pow10 ()

double
go_pow10 (int n);

Computes 10 to the power of n . This is fast and accurate (under the reasonable assumption that the compiler is accurate).

Parameters

n

exponent

 

go_pow10l ()

long double
go_pow10l (int n);

Computes 10 to the power of n . This is fast and accurate (under the reasonable assumption that the compiler is accurate).

Parameters

n

exponent

 

go_pow10D ()

_Decimal64
go_pow10D (int n);

Computes 10 to the power of n . This is fast and accurate (under the reasonable assumption that the compiler is accurate).

Parameters

n

exponent

 

go_pow2 ()

double
go_pow2 (int n);

Computes 2 to the power of n . This is fast and accurate.

Parameters

n

exponent

 

go_pow2l ()

long double
go_pow2l (int n);

Computes 2 to the power of n . This is fast and accurate.

Parameters

n

exponent

 

go_pow2D ()

_Decimal64
go_pow2D (int n);

Computes 2 to the power of n . This is fast and accurate.

Parameters

n

exponent

 

go_rint ()

double
go_rint (double x);

go_stern_brocot ()

void
go_stern_brocot (double val,
                 int max_denom,
                 int *res_num,
                 int *res_denom);

go_strtod ()

double
go_strtod (const char *s,
           char **end);

Parameters

s

string to convert

 

end

pointer to end of string.

[out][transfer none][optional]

Returns

the numeric value of the given string. Like strtod, but without hex notation and MS extensions. Unlike strtod, there is no need to reset errno before calling this.


go_strtold ()

long double
go_strtold (const char *s,
            char **end);

Parameters

s

string to convert

 

end

pointer to end of string.

[out][transfer none][optional]

Returns

the numeric value of the given string. Like strtold, but without hex notation and MS extensions. Unlike strtold, there is no need to reset errno before calling this.


go_strtoDd ()

_Decimal64
go_strtoDd (const char *s,
            char **end);

Parameters

s

string to convert

 

end

pointer to end of string.

[out][transfer none][optional]

Returns

the numeric value of the given string. Like strtod, but for type _Decimal64 and without hex notation and MS extensions. Unlike strtold, there is no need to reset errno before calling this.


go_sub_epsilon ()

double
go_sub_epsilon (double x);

Parameters

x

a number

 

Returns

the next-smaller representable value, except that zero and infinites are returned unchanged.


go_sub_epsilonl ()

long double
go_sub_epsilonl (long double x);

Parameters

x

a number

 

Returns

the next-smaller representable value, except that zero and infinites are returned unchanged.


go_sub_epsilonD ()

_Decimal64
go_sub_epsilonD (_Decimal64 x);

Parameters

x

a number

 

Returns

the next-smaller representable value, except that zero and infinites are returned unchanged.


ldexpl ()

long double
ldexpl (long double x,
        int e);

log1p ()

double
log1p (double x);

modfl ()

long double
modfl (long double x,
       long double *iptr);

strtold ()

long double
strtold (const char *Param1,
         char **Param2);