Skip to content
/ modern-bcd Public

Modern C++ implementation of binary-coded decimal (BCD) routines

License

Notifications You must be signed in to change notification settings

bcd/modern-bcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modern-bcd

Modern C++ implementation of binary-coded decimal (BCD) routines

This header-only library provides a native binary-coded decimal type. Wikipedia It provides an integer type library that stores its values in BCD format instead of pure binary.

See the test program for many examples of how to use it.

BCD is not widely used anymore due to the vast speed improvements of division routines over the last 50 years. The primary benefit of BCD was that it was cheap to print/display, but on modern CPUs with

  • processors running thousands of times faster,
  • builtin division support, and
  • a preference for cache efficiency to achieve performance

the BCD type is no longer as critical. However it remains a favorite of mine due to the initialism :)

  • BCD

About

Modern C++ implementation of binary-coded decimal (BCD) routines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published