How to implement decimal types in a language's VM?

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • rust-decimal

    Decimal number implementation written in pure Rust suitable for financial and fixed-precision calculations.

  • For mine, I switch the default floating type from f64 to decimal using https://docs.rs/rust_decimal/.

  • libdivide

    Official git repository for libdivide: optimized integer division

  • There are many optimisations to be done here. Perhaps most importantly, modulo can be implemented performantly using techniques such as those used by libdivide. You may use machine integers to represent such variables when their bound is such that an intermediate value would never overflow; and static analysis may identify opportunities to perform many calculations in sequence before reducing (but when operating on wide or extended-precision integers, this may hurt more than it helps).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts