https://github.com/ericlagergren/decimal

A high-performance, arbitrary-precision, floating-point decimal library.

https://github.com/ericlagergren/decimal

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.8%) to scientific vocabulary

Keywords

arbitrary-precision big-decimal data-science decimal dogs-of-instagram financial general-decimal-arithmetic money multi-precision
Last synced: 6 months ago · JSON representation

Repository

A high-performance, arbitrary-precision, floating-point decimal library.

Basic Info
Statistics
  • Stars: 563
  • Watchers: 14
  • Forks: 64
  • Open Issues: 27
  • Releases: 2
Topics
arbitrary-precision big-decimal data-science decimal dogs-of-instagram financial general-decimal-arithmetic money multi-precision
Created about 10 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Authors

README-fr.md

decimal Build Status GoDoc

Decimal est une logithèque décimal virgule flottante, avec haute performance et précision arbitrarie que mettre en œuvre la spécification General Decimal Arithmetic.

Les fonctions

  • Valeur zéros sont sûr utiliser.
  • Multiple modes de fonctionnement.
  • Haute performance.
  • Une logithèque mathématiques avec fonctions élémentaires et trigonométriques, fraction continues, et beaucoup plus.
  • Un API familier et idiomatique.

Installation

go get github.com/ericlagergren/decimal

Documentation

Godoc

Gestion des versions

decimal utilise la gestion sémantique de la version. La version actuelle est 3.3.1.

decimal ne prend en charge que le deux versions plus récentes.

Licence

La BSD 3-clause

Owner

  • Name: Eric Lagergren
  • Login: ericlagergren
  • Kind: user
  • Location: Washington state
  • Company: @spideroak

also: @elagergren-spideroak

GitHub Events

Total
  • Issues event: 3
  • Watch event: 35
  • Issue comment event: 1
  • Fork event: 2
Last Year
  • Issues event: 3
  • Watch event: 35
  • Issue comment event: 1
  • Fork event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 70
  • Total pull requests: 44
  • Average time to close issues: 2 months
  • Average time to close pull requests: 2 months
  • Total issue authors: 52
  • Total pull request authors: 24
  • Average comments per issue: 2.96
  • Average comments per pull request: 1.5
  • Merged pull requests: 30
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 10
  • Pull requests: 4
  • Average time to close issues: 16 days
  • Average time to close pull requests: 3 days
  • Issue authors: 6
  • Pull request authors: 2
  • Average comments per issue: 0.2
  • Average comments per pull request: 1.5
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aarondl (6)
  • ericlagergren (4)
  • hiroki-money (2)
  • kentquirk (2)
  • eduardhasanaj (2)
  • bojanz (2)
  • yarco (2)
  • jordanlewis (2)
  • OpinionatedGeek (1)
  • lotodore (1)
  • M-Lewinski (1)
  • lokeshj (1)
  • hiromaily (1)
  • PumpkinSeed (1)
  • susuper (1)
Pull Request Authors
  • ericlagergren (10)
  • rdingwall (6)
  • jordanlewis (3)
  • lotodore (2)
  • alexeykiselev (2)
  • ab0455a08d03 (2)
  • nathanhack (2)
  • mindreframer (1)
  • chochihim (1)
  • mediocregopher (1)
  • hongshaoyang (1)
  • grodriguez85 (1)
  • hanfezh (1)
  • orian (1)
  • cyyber (1)
Top Labels
Issue Labels
enhancement (6) bug (5) help wanted (3) question (3) docs (2) wontfix (1) fixed (1) thinking (1)
Pull Request Labels
enhancement (1)

Packages

  • Total packages: 6
  • Total downloads: unknown
  • Total docker downloads: 1,211,967
  • Total dependent packages: 438
    (may contain duplicates)
  • Total dependent repositories: 461
    (may contain duplicates)
  • Total versions: 3
proxy.golang.org: github.com/ericlagergren/decimal

Package decimal provides a high-performance, arbitrary precision, floating-point decimal library. This package provides floating-point decimal numbers, useful for financial programming or calculations where a larger, more accurate representation of a number is required. In addition to basic arithmetic operations (addition, subtraction, multiplication, and division) this package offers various mathematical functions, including the exponential function, various logarithms, and the ability to compute continued fractions. While lean, this package is full of features. It implements interfaces like “fmt.Formatter” and intuitively utilizes verbs and flags as described in the “fmt” package. (Also included: “fmt.Scanner”, “fmt.Stringer”, “encoding.TextUnmarshaler”, and “encoding.TextMarshaler”.) It allows users to specific explicit contexts for arithmetic operations, but doesn't require it. It provides access to NaN payloads and is more lenient when parsing a decimal from a string than the GDA specification requires. API interfaces have been changed slightly to work more seamlessly with existing Go programs. For example, many “Quantize” implementations require a decimal as both the receiver and argument which isn't very user friendly. Instead, this library accepts a simple “int” which can be derived from an existing decimal if required. It contains two modes of operation designed to make transitioning to various GDA "quirks" (like always rounding lossless operations) easier. There are three primary goals of this library: By adhering to the General Decimal Arithmetic specification, this package has a well-defined structure for its arithmetic operations. Decimal libraries are inherently slow; this library works diligently to minimize memory allocations and utilize efficient algorithms. Performance regularly benchmarks as fast or faster than many other popular decimal libraries. Libraries should be intuitive and work out of the box without having to configure too many settings; however, precise settings should still be available. The following type is supported: The zero value for a Big corresponds with 0, meaning all the following are valid: Method naming is the same as math/big's, meaning: In general, its conventions mirror math/big's. It is suggested to read the math/big package comments to gain an understanding of this package's conventions. Arguments to Binary and Unary methods are allowed to alias, so the following is valid: Unless otherwise specified, the only argument that will be modified is the result (“z”). This means the following is valid and race-free: But this is not:

  • Versions: 0
  • Dependent Packages: 438
  • Dependent Repositories: 460
  • Docker Downloads: 1,211,967
Rankings
Dependent packages count: 0.3%
Dependent repos count: 0.3%
Docker downloads count: 0.7%
Average: 1.4%
Stargazers count: 2.7%
Forks count: 3.1%
Last synced: 6 months ago
proxy.golang.org: github.com/ericlagergren/decimal/internal/c

Package c provides internal constants.

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 2.7%
Forks count: 3.2%
Average: 4.5%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/ericlagergren/decimal/internal/arith

Package arith provides performance-sensitive arithmetic operations.

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 2.7%
Forks count: 3.2%
Average: 4.5%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: gopkg.in/ericlagergren/decimal.v1

Package decimal provides a high-performance, arbitrary precision, fixed-point decimal library. The following type is supported: The zero value for a Big corresponds with 0. Its method naming is the same as math/big's, meaning: In general, its conventions will mirror math/big's. In general, operations that use the receiver z as storage will not modify z's Context. Additionally, the arguments to Binary and Unary methods are allowed to alias, so the following is valid: Compared to other decimal libraries, this package:

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.7%
Forks count: 2.0%
Average: 5.0%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
proxy.golang.org: gopkg.in/ericlagergren/decimal.v2

Package decimal provides a high-performance, arbitrary precision, fixed-point decimal library. The following type is supported: The zero value for a Big corresponds with 0. Its method naming is the same as math/big's, meaning: In general, its conventions will mirror math/big's. In general, operations that use the receiver z as storage will not modify z's Context. Additionally, the arguments to Binary and Unary methods are allowed to alias, so the following is valid: Compared to other decimal libraries, this package:

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.7%
Forks count: 2.0%
Average: 5.0%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
proxy.golang.org: github.com/ericlagergren/decimal/v3

Package decimal provides a high-performance, arbitrary precision, floating-point decimal library. This package provides floating-point decimal numbers, useful for financial programming or calculations where a larger, more accurate representation of a number is required. In addition to basic arithmetic operations (addition, subtraction, multiplication, and division) this package offers various mathematical functions, including the exponential function, various logarithms, and the ability to compute continued fractions. While lean, this package is full of features. It implements interfaces like “fmt.Formatter” and intuitively utilizes verbs and flags as described in the “fmt” package. (Also included: “fmt.Scanner”, “fmt.Stringer”, “encoding.TextUnmarshaler”, and “encoding.TextMarshaler”.) It allows users to specific explicit contexts for arithmetic operations, but doesn't require it. It provides access to NaN payloads and is more lenient when parsing a decimal from a string than the GDA specification requires. API interfaces have been changed slightly to work more seamlessly with existing Go programs. For example, many “Quantize” implementations require a decimal as both the receiver and argument which isn't very user friendly. Instead, this library accepts a simple “int” which can be derived from an existing decimal if required. It contains two modes of operation designed to make transitioning to various GDA "quirks" (like always rounding lossless operations) easier. There are three primary goals of this library: By adhering to the General Decimal Arithmetic specification, this package has a well-defined structure for its arithmetic operations. Decimal libraries are inherently slow; this library works diligently to minimize memory allocations and utilize efficient algorithms. Performance regularly benchmarks as fast or faster than many other popular decimal libraries. Libraries should be intuitive and work out of the box without having to configure too many settings; however, precise settings should still be available. The following type is supported: The zero value for a Big corresponds with 0, meaning all the following are valid: Method naming is the same as math/big's, meaning: In general, its conventions mirror math/big's. It is suggested to read the math/big package comments to gain an understanding of this package's conventions. Arguments to Binary and Unary methods are allowed to alias, so the following is valid: Unless otherwise specified, the only argument that will be modified is the result (“z”). This means the following is valid and race-free: But this is not:

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Stargazers count: 2.8%
Forks count: 3.2%
Dependent repos count: 4.7%
Average: 5.1%
Dependent packages count: 9.6%
Last synced: 6 months ago

Dependencies

go.mod go
  • github.com/apmckinlay/gsuneido v0.0.0-20190404155041-0b6cd442a18f
  • github.com/cockroachdb/apd v1.1.0
  • github.com/lib/pq v1.0.0
  • github.com/pkg/errors v0.8.0
  • github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24
  • gopkg.in/inf.v0 v0.9.1
go.sum go
  • github.com/apmckinlay/gsuneido v0.0.0-20190404155041-0b6cd442a18f
  • github.com/cockroachdb/apd v1.1.0
  • github.com/lib/pq v1.0.0
  • github.com/pkg/errors v0.8.0
  • github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24
  • gopkg.in/inf.v0 v0.9.1
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite