awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
shopspring avatar

shopspring/decimal

0
View on GitHub↗
7,242 Stars·652 Forks·Go·other·10 Aufrufe

Decimal

This is an arbitrary-precision decimal library and fixed-point math implementation used to eliminate floating-point rounding errors. It provides tools for high-precision arithmetic, a numerical analysis toolkit, and a database decimal mapper to ensure numerical accuracy in financial and scientific calculations.

The library includes specialized serialization tools to transform high-precision numbers into SQL database types, JSON, and XML formats without losing precision. It also implements a variety of rounding strategies, including banker and cash rounding, and provides mechanisms for decimal truncation and exponent shifting.

The project covers a broad range of mathematical capabilities, including basic arithmetic, division with remainders, and statistical aggregation. It further supports advanced functions such as natural logarithms, exponents, power and root calculations, and trigonometric functions.

Conversion utilities are provided to create decimal values from strings, integers, floating-point numbers, big integers, and rational numbers.

Features

  • Arbitrary Precision Arithmetic - Provides a computational engine using integer-based math to eliminate floating-point errors in financial and scientific calculations.
  • Numerical Rounding - Implements diverse rounding strategies including banker's rounding, cash rounding, and rounding toward zero.
  • Database Type Mappings - Maps application decimal types to native database formats using standard scanner and valuer interfaces.
  • Database Row Mappers - Maps arbitrary-precision decimal values to SQL database types using scanner and valuer patterns.
  • Fixed-Point Arithmetic Libraries - Implements addition and subtraction on arbitrary precision numbers using fixed-point arithmetic.
  • Fixed-Point Representations - Stores numbers as large integers paired with a scale factor to avoid binary floating-point precision errors.
  • Financial Arithmetic Libraries - Performs high-precision arithmetic on currency and monetary values to prevent floating-point rounding errors.
  • Natural Logarithms - Provides high-precision computation of natural logarithms to a user-specified number of decimal places.
  • JSON and Serialization - Transforms high-precision numbers into JSON and XML exchange formats without losing numerical accuracy.
  • Numeric JSON Serialization - Ensures high-precision decimals are consistently serialized to SQL and JSON formats during transmission.
  • Data Serialization Formats - Serializes high-precision decimals to and from JSON, XML, and binary formats without losing precision.
  • Decimal Type Conversion - Creates high-precision decimal values from strings, integers, floating-point numbers, and rational types.
  • Decimal String Formatting - Converts decimal numbers into rounded strings using standard, banker, or cash formats for consistent display.
  • Decimal Truncation - The project removes fractional digits from a number without rounding to reach a specified precision limit.
  • Exponent Shifting Utilities - Allows moving the decimal point left or right by modifying the internal exponent of the value.
  • Exponential Functions - Implements the calculation of natural exponents using algorithms tailored for high-precision decimal results.
  • Scientific Computing - Computes high-precision natural logarithms and trigonometric values for scientific software.
  • Exponent Scaling - Implements an internal scaling mechanism that adjusts numeric magnitude by shifting the scale factor rather than modifying the coefficient.
  • Precision Arithmetic - Executes complex mathematical functions and power operations with a configurable number of decimal places.
  • Euclidean Division Utilities - Allows for the division of two decimals to return both the quotient and the remainder.
  • Trigonometric Functions - Implements standard trigonometric functions including sine, cosine, tangent, and arctangent for decimal values.
  • Numerical Analysis Toolkits - Provides a toolkit for computing natural logarithms, exponents, and trigonometric values with configurable precision.
  • Power Functions - Provides high-precision power functions for raising decimal values to specified exponents.
  • Financial Tools - Arbitrary-precision fixed-point decimal numbers.
  • Mathematical Computing - Arbitrary-precision fixed-point decimal library.
  • Financial Libraries - Arbitrary-precision decimal numbers.

Star-Verlauf

Star-Verlauf für shopspring/decimalStar-Verlauf für shopspring/decimal

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Decimal

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Decimal.
  • mikemcl/big.jsAvatar von MikeMcl

    MikeMcl/big.js

    5,186Auf GitHub ansehen↗

    big.js is an arbitrary-precision decimal library for JavaScript designed to perform exact decimal arithmetic. It provides a set of tools for high-precision addition, subtraction, multiplication, and division to avoid the rounding errors common in binary floating-point representations. The library allows for the creation of custom number constructors to isolate precision settings and rounding rules for different groups of numbers. It supports configurable global precision and specific rounding behaviors, such as truncate or round half even, for division and power operations. The capability su

    JavaScript
    Auf GitHub ansehen↗5,186
  • stdlib-js/stdlibAvatar von stdlib-js

    stdlib-js/stdlib

    5,735Auf GitHub ansehen↗
    JavaScriptjavascriptjslibrary
    Auf GitHub ansehen↗5,735
  • leekchan/accountingAvatar von leekchan

    leekchan/accounting

    911Auf GitHub ansehen↗

    money and currency formatting for golang

    Go
    Auf GitHub ansehen↗911
  • g-truc/glmAvatar von g-truc

    g-truc/glm

    10,710Auf GitHub ansehen↗

    This project is a header-only C++ library designed for graphics mathematics, providing a comprehensive suite of vector, matrix, and quaternion types. It is built using template metaprogramming to generate mathematical primitives at compile time, eliminating the need for precompiled binary libraries and allowing for direct integration into existing build systems. The library is distinguished by its strict adherence to the OpenGL Shading Language specification, ensuring that mathematical results remain consistent across both CPU and GPU code. It provides specialized utilities for managing float

    C++cppcpp-libraryglm
    Auf GitHub ansehen↗10,710
Alle 30 Alternativen zu Decimal anzeigen→

Häufig gestellte Fragen

Was macht shopspring/decimal?

This is an arbitrary-precision decimal library and fixed-point math implementation used to eliminate floating-point rounding errors. It provides tools for high-precision arithmetic, a numerical analysis toolkit, and a database decimal mapper to ensure numerical accuracy in financial and scientific calculations.

Was sind die Hauptfunktionen von shopspring/decimal?

Die Hauptfunktionen von shopspring/decimal sind: Arbitrary Precision Arithmetic, Numerical Rounding, Database Type Mappings, Database Row Mappers, Fixed-Point Arithmetic Libraries, Fixed-Point Representations, Financial Arithmetic Libraries, Natural Logarithms.

Welche Open-Source-Alternativen gibt es zu shopspring/decimal?

Open-Source-Alternativen zu shopspring/decimal sind unter anderem: mikemcl/big.js — big.js is an arbitrary-precision decimal library for JavaScript designed to perform exact decimal arithmetic. It… stdlib-js/stdlib. leekchan/accounting — money and currency formatting for golang. g-truc/glm — This project is a header-only C++ library designed for graphics mathematics, providing a comprehensive suite of… nefe/number-precision — number-precision is a JavaScript math library and arbitrary precision arithmetic utility. It provides a set of… mikemcl/bignumber.js — bignumber.js is an arbitrary-precision JavaScript library designed to perform mathematical operations on decimals and…