Function mchop
truncates the mantissa of a double
to a given number of binary places, preserving the more significant and setting the less significant to 0. Similar to "chop" in Octave except that, despite its name, Octave's function rounds. If C99 is available, variants mchopf
and mchopl
are provided, which instead accept/return, respectively, float
and long double
. If C11 is available then a type-generic version is provided.
-
Notifications
You must be signed in to change notification settings - Fork 0
seanrostami/mchop
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Truncates the mantissa of a floating-point value to a given number of binary places, preserving the most significant and setting the others to 0.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published