fixnum->flonum(3scm)

πŸ“¦ version 0-unstable-2024-02, in nixpkgs unstable

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