floor
builtins.floor
Primop
Docs pulled from | This Revision | about 10 hours ago
Takes 1 arguments
double
Rounds and converts number to the next lower NixInt value if possible, i.e. floor *number* <= *number*
and
*number* - floor *number* < 1
.
An evaluation error is thrown, if there exists no such NixInt value floor *number*
.
Due to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of number is
a NixInt and if *number* < -9007199254740992
or *number* > 9007199254740992
.
If the datatype of number is neither a NixInt (signed 64-bit integer) nor a NixFloat (IEEE-754 double-precision floating-point number), an evaluation error will be thrown.
This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.
Noogle detected
Detected Type
floor :: Float -> Int
Implementation
This function is implemented in c++ and is part of the native nix runtime.