scientific alternatives and similar packages
Based on the "Data" category.
Alternatively, view scientific alternatives based on common mentions on social networks and blogs.
-
lens
Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens -
semantic-source
Parsing, analyzing, and comparing source code across many languages -
text
Haskell library for space- and time-efficient operations over Unicode text. -
code-builder
Packages for defining APIs, running them, generating client code and documentation. -
cassava
A CSV parsing and encoding library optimized for ease of use and high performance -
unordered-containers
Efficient hashing-based container types -
compendium-client
Mu (μ) is a purely functional framework for building micro services. -
holmes
A reference library for constraint-solving with propagators and CDCL. -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
primitive
This package provides various primitive memory-related operations. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
audiovisual
Extensible records, variants, structs, effects, tangles -
IORefCAS
A collection of different packages for CAS based data structures. -
dependent-map
Dependently-typed finite maps (partial dependent products) -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text. -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
safecopy
An extension to Data.Serialize with built-in version control -
uuid-types
A Haskell library for creating, printing and parsing UUIDs
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of scientific or a related project?
README
Data.Scientific
provides a space efficient and arbitrary precision
scientific number type.
Scientific
numbers are represented using
scientific notation. It uses
a coefficient c :: Integer
and a base-10 exponent e :: Int
(do note that
since we're using an Int
to represent the exponent these numbers aren't truly
arbitrary precision. I intend to change this to Integer in the future!). A
scientific number corresponds to the Fractional
number:
fromInteger c * 10 ^^ e
.
The main application of Scientific
is to be used as the target of parsing
arbitrary precision numbers coming from an untrusted source. The advantages over
using Rational
for this are that:
A
Scientific
is more efficient to construct. Rational numbers need to be constructed using%
which has to compute thegcd
of thenumerator
anddenominator
.Scientific
is safe against numbers with huge exponents. For example:1e1000000000 :: Rational
will fill up all space and crash your program. Scientific works as expected:
> read "1e1000000000" :: Scientific
1.0e1000000000
- Also, the space usage of converting scientific numbers with huge exponents to
Integral's (like:
Int
) or RealFloats (like:Double
orFloat
) will always be bounded by the target type.