| 115 | |
| 116 | `(make-flonum `''x n''`)` |
| 117 | |
| 118 | Returns the flonum (fl* x (expt 2 n)), where ''n'' is a non-negative integer with an implementation-dependent maximum value. (C99 `ldexp`) |
| 119 | |
| 120 | `(make-binary-flonum `''x n''`)` |
| 121 | |
| 122 | Returns the flonum (fl* x (expt fl-radix n)), where ''n'' is a non-negative integer with an implementation-dependent maximum value. (C99 `scalbn`) |
| 123 | |
| 124 | === Accessors === |
| 125 | |
| 126 | `(flinteger-fraction `''x''`)` |
| 127 | |
| 128 | Returns two values, the integral part of ''x'' as a flonum and the fractional part of ''x'' as a flonum. (C99 `modf`) |
| 129 | |
| 130 | `(flexponent `''x''`)` |
| 131 | |
| 132 | Returns the value of `(* (fltrunc (fllog (flabs x) fl-radix)) (flsgn x))`. (C99 `logb`) |
| 133 | |
| 134 | `(flinteger-exponent `''x''`)` |
| 135 | |
| 136 | Returns the same as `flexponent` as an exact integer. If ''x'' is zero, returns `fl-integer-exponent-zero`; if ''x'' is a NaN, returns `fl-integer-exponent-nan`; if ''x'' is infinite, returns a large implementation-dependent exact integer. (C99 `ilogb`) |
| 137 | |
| 138 | `(flnormalized-fraction-exponent `''x''`)` |
| 139 | |
| 140 | Returns two values, a correctly signed fraction ''y'' whose absolute value is between 0.5 (inclusive) and 1.0 (exclusive), and an exponent ''n'' such that `(fl* y (flexpt 2 n))` is equal to ''x''. (C99 `frexp`) |
241 | | {{{ |
242 | | flexp double exp(double) ex |
243 | | fl2 double exp2(double) base-2 exponential |
244 | | flexp-minus-1 double expm1(double) exp-1 |
245 | | flsquare |
246 | | flsqrt |
247 | | flcbrt double cbrt(double) cube root |
248 | | flhypot double hypot(double, double) sqrt(x2+y2) |
249 | | flexp |
250 | | fl2exp double ldexp(double x, int n) x*2n |
251 | | flexponent double logb(double x) the exponent of x, |
252 | | which is the integral part of |
253 | | log_r(|x|), as a signed floating-point value, for non-zero x, |
254 | | where r is the radix of the machine's floating-point arithmetic |
255 | | flfraction-exponent double modf(double, double * |
256 | | returns two values, fraction and int exponent |
257 | | flinteger-exponent int ilogb(double) binary log as int |
258 | | fllog |
259 | | fllog2 double log2(double) log base 2 |
260 | | fllog10 double log10(double) log base 10 |
261 | | fllog+1 double log1p(double x) log (1+x) |
262 | | flnormalized-fraction-exponent double frexp(double, int *) |
263 | | returns two values, fraction in range [1/2,1) and int exponent |
264 | | flscalbn double scalbn(double x, int y) x*ry, |
265 | | where r is the machine float radix |
266 | | }}} |
267 | | |
268 | | The `flsqrt` procedure returns the principal square root of ''x''. For -0.0, |
| 267 | `(flexp `''x''`)` |
| 268 | |
| 269 | Corresponds to `exp`. |
| 270 | |
| 271 | `(flexp2 `''x''`)` |
| 272 | |
| 273 | Corresponds to `(expt 2.0 x)`. (C99 `exp2`) |
| 274 | |
| 275 | `(flexp-1 `''x''`)` |
| 276 | |
| 277 | Equivalent to `(flexp (fl- x 1))`, but is much more accurate for values of x near 1. It is recommended for use in algorithms where accuracy is important. (C99 `expm1`) |
| 278 | |
| 279 | `(flsquare `''x''`)` |
| 280 | |
| 281 | Returns the square of ''x''. |
| 282 | |
| 283 | `(flsqrt `''x''`)` |
| 284 | |
| 285 | Returns the principal square root of ''x''. For -0.0, |
279 | | `(flsin `''x''`)` (C99 `sin`) |
280 | | |
281 | | `(flcos `''x''`)` (C99 `cos`) |
282 | | |
283 | | `(fltan `''x''`)` (C99 `tan`) |
284 | | |
285 | | `(flasin `''x''`)` (C99 `asin`) |
286 | | |
287 | | `(flacos `''x''`)` (C99 `acos`) |
288 | | |
289 | | `(flatan `''x'' [''y'']`)` (C99 `atan` and `atan2`) |
290 | | |
291 | | `(flsinh `''x''`)` (C99 `sinh`) |
292 | | |
293 | | `(flcosh `''x''`)` (C99 `cosh`) |
294 | | |
295 | | `(fltanh `''x''`)` (C99 `tanh`) |
296 | | |
297 | | `(flasinh `''x''`)` (C99 `asinh`) |
298 | | |
299 | | `(flacosh `''x''`)` (C99 `acosh`) |
300 | | |
301 | | `(flatanh `''x''`)` (C99 `atanh`) |
302 | | |
303 | | These are the usual trigonometric functions. The `flatan` function, when passed two arguments, returns `(flatan (/ y x))` without requiring the use of complex numbers. |
304 | | |
305 | | `(flremquo `''x y''`)` |
306 | | |
307 | | Returns two values, the result of `(flround-remainder x y)` and the low-order ''n'' bits (as a correctly signed exact integer) of the rounded quotient. The value of ''n'' is implementation-dependent but at least 3. This function can be used to reduce the argument of the inverse trigonometric functions, while preserving the correct quadrant or octant. |
| 322 | `(flsin `''x''`)` |
| 323 | |
| 324 | `(flcos `''x''`)` |
| 325 | |
| 326 | `(fltan `''x''`)` |
| 327 | |
| 328 | `(flasin `''x''`)` |
| 329 | |
| 330 | `(flacos `''x''`)` |
| 331 | |
| 332 | `(flatan `''x'' [''y'']`)` |
| 333 | |
| 334 | `(flsinh `''x''`)` |
| 335 | |
| 336 | `(flcosh `''x''`)` |
| 337 | |
| 338 | `(fltanh `''x''`)` |
| 339 | |
| 340 | `(flasinh `''x''`)` |
| 341 | |
| 342 | `(flacosh `''x''`)` |
| 343 | |
| 344 | `(flatanh `''x''`)` |
| 345 | |
| 346 | These are the usual trigonometric functions. The `flatan` function, when passed two arguments, returns `(flatan (/ y x))` without requiring the use of complex numbers (C99 `atan2`). |