How to Install and Uninstall ghc-scientific Package on openSuSE Tumbleweed
Last updated: December 26,2024
1. Install "ghc-scientific" package
Learn how to install ghc-scientific on openSuSE Tumbleweed
$
sudo zypper refresh
Copied
$
sudo zypper install
ghc-scientific
Copied
2. Uninstall "ghc-scientific" package
Please follow the step by step instructions below to uninstall ghc-scientific on openSuSE Tumbleweed:
$
sudo zypper remove
ghc-scientific
Copied
3. Information about the ghc-scientific package on openSuSE Tumbleweed
Information for package ghc-scientific:
---------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : ghc-scientific
Version : 0.3.7.0-7.4
Arch : x86_64
Vendor : openSUSE
Installed Size : 374.0 KiB
Installed : No
Status : not installed
Source package : ghc-scientific-0.3.7.0-7.4.src
Upstream URL : https://hackage.haskell.org/package/scientific
Summary : Numbers represented using scientific notation
Description :
"Data.Scientific" provides the number type 'Scientific'. Scientific numbers are
arbitrary precision and space efficient. They are represented using
.
The implementation uses a coefficient 'c :: 'Integer'' and a base-10 exponent
'e :: 'Int''. A scientific number corresponds to the 'Fractional' number:
''fromInteger' c * 10 '^^' e'.
Note that since we're using an 'Int' to represent the exponent these numbers
aren't truly arbitrary precision. I intend to change the type of the exponent
to 'Integer' in a future release.
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 the 'gcd' of the 'numerator' and
'denominator'.
* '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 ''RealFloat's' (like: 'Double' or 'Float') will
always be bounded by the target type.
---------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : ghc-scientific
Version : 0.3.7.0-7.4
Arch : x86_64
Vendor : openSUSE
Installed Size : 374.0 KiB
Installed : No
Status : not installed
Source package : ghc-scientific-0.3.7.0-7.4.src
Upstream URL : https://hackage.haskell.org/package/scientific
Summary : Numbers represented using scientific notation
Description :
"Data.Scientific" provides the number type 'Scientific'. Scientific numbers are
arbitrary precision and space efficient. They are represented using
The implementation uses a coefficient 'c :: 'Integer'' and a base-10 exponent
'e :: 'Int''. A scientific number corresponds to the 'Fractional' number:
''fromInteger' c * 10 '^^' e'.
Note that since we're using an 'Int' to represent the exponent these numbers
aren't truly arbitrary precision. I intend to change the type of the exponent
to 'Integer' in a future release.
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 the 'gcd' of the 'numerator' and
'denominator'.
* '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 ''RealFloat's' (like: 'Double' or 'Float') will
always be bounded by the target type.