awesome-repositories.com
Blog
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
shopspring avatar

shopspring/decimal

0
View on GitHub↗
7,242 stele·652 fork-uri·Go·other·10 vizualizări

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.

Istoric stele

Graficul istoricului de stele pentru shopspring/decimalGraficul istoricului de stele pentru shopspring/decimal

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Alternative open-source pentru Decimal

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Decimal.
  • mikemcl/big.jsAvatar MikeMcl

    MikeMcl/big.js

    5,186Vezi pe GitHub↗

    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
    Vezi pe GitHub↗5,186
  • stdlib-js/stdlibAvatar stdlib-js

    stdlib-js/stdlib

    5,735Vezi pe GitHub↗
    JavaScriptjavascriptjslibrary
    Vezi pe GitHub↗5,735
  • leekchan/accountingAvatar leekchan

    leekchan/accounting

    911Vezi pe GitHub↗

    money and currency formatting for golang

    Go
    Vezi pe GitHub↗911
  • g-truc/glmAvatar g-truc

    g-truc/glm

    10,710Vezi pe GitHub↗

    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
    Vezi pe GitHub↗10,710
Vezi toate cele 30 alternative pentru Decimal→

Întrebări frecvente

Ce face 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.

Care sunt principalele funcționalități ale shopspring/decimal?

Principalele funcționalități ale shopspring/decimal sunt: Arbitrary Precision Arithmetic, Numerical Rounding, Database Type Mappings, Database Row Mappers, Fixed-Point Arithmetic Libraries, Fixed-Point Representations, Financial Arithmetic Libraries, Natural Logarithms.

Care sunt câteva alternative open-source pentru shopspring/decimal?

Alternativele open-source pentru shopspring/decimal includ: 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…