Skip to content

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.

Notifications You must be signed in to change notification settings

seanrostami/mchop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

mchop

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.

AUTHOR

Sean Rostami

CONTACT

sean.rostami@gmail.com

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

No packages published

Languages