fixnum->flonum(3scm)
hiii bestie π welcome to the fixnum->flonum(3scm) page from the Scheme Programmer's Manual β we're about to make a fixnum turn into a flonum, and it's honestly giving conversion main character energy β¨
πΈ NAME πΈ
fixnum->flonum β conversion from fixnum to flonum π¦
π LIBRARY π
okay so you get these from the library, no cap:
(import (rnrs)) ;R6RS
(import (rnrs arithmetic flonums)) ;R6RS
π οΈ SYNOPSIS π οΈ
(fixnum->flonum fx)
π DESCRIPTION π
Returns a flonum that is numerically closest to fx. Periodt π
lowkey important: 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. That's it, that's the whole gift π«Ά
π 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 π
π 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://github.com/schemedoc/manpages/ π§
and that's the whole vibe check, bestie π this little page is sourced as fixnum->flonum(3scm), dated 2023-08-13 β slay, bye ππ
π¦ where this page comes from
- nixpkgs unstable: scheme-manpages 0-unstable-2024-02-11
- π the page's license: MIT
- Copyright (c) 2023 Gwen Weinholt
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms