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);
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);
Returns
the next-larger representable value, except that zero and
infinites are returned unchanged.
go_add_epsilonD ()
_Decimal64
go_add_epsilonD (_Decimal64 x);
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.
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.
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.
go_atan2pi ()
double
go_atan2pi (double y,
double x);
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);
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);
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);
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);
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);
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);
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);
Returns
the cosine of Pi times x
, but with less error than doing the
multiplication outright.
go_cospiD ()
_Decimal64
go_cospiD (_Decimal64 x);
Returns
the cosine of Pi times x
, but with less error than doing the
multiplication outright.
go_cotpi ()
double
go_cotpi (double x);
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);
Returns
the cotangent of Pi times x
, but with less error than doing the
multiplication outright.
go_cotpiD ()
_Decimal64
go_cotpiD (_Decimal64 x);
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
go_fake_ceil ()
double
go_fake_ceil (double x);
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);
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);
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);
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);
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);
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).
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).
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).
go_pow2 ()
double
go_pow2 (int n);
Computes 2 to the power of n
. This is fast and accurate.
go_pow2l ()
long double
go_pow2l (int n);
Computes 2 to the power of n
. This is fast and accurate.
go_pow2D ()
_Decimal64
go_pow2D (int n);
Computes 2 to the power of n
. This is fast and accurate.
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);
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);
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);
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);
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);
Returns
the next-smaller representable value, except that zero and
infinites are returned unchanged.
go_sub_epsilonD ()
_Decimal64
go_sub_epsilonD (_Decimal64 x);
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);