| fixnum->flonum(3scm) | Scheme Programmer's Manual | fixnum->flonum(3scm) |
NAME
fixnum->flonum - conversion from fixnum to flonum
LIBRARY
(import (rnrs)) ;R6RS (import (rnrs arithmetic flonums)) ;R6RS
SYNOPSIS
(fixnum->flonum fx)
DESCRIPTION
Returns a flonum that is numerically closest to fx.
The result of this procedure may not be numerically equal to fx, because the fixnum precision may be greater than the flonum precision.
RETURN VALUES
Returns a single value; a flonum.
EXAMPLES
(fixnum->flonum 1)
=> 1.0
COMPATIBILITY
This procedure is unique to R6RS. An alternative is to use inexact(3scm).
ERRORS
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
- The wrong number of arguments was passed or an argument was outside its domain.
SEE ALSO
inexact(3scm)
STANDARDS
R6RS
HISTORY
This procedure is new in the flonum library in R6RS.
AUTHORS
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.
| 2023-08-13 |