packages feed

posit 2022.0.1.3 → 2022.0.1.4

raw patch · 5 files changed

+27/−12 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,9 +1,21 @@ # Changelog for Posit Numbers +# posit-2022.0.1.4++  * `atan 1 :: Posit256` is very slow, added a few precice constants to speed it up++# posit-2022.0.1.3++  * Much thanks to @svlc sugesting to link to a raw image rather than an html, and that finaly made the images display on Hackage++# posit-2022.0.1.2++  * Another attempt to get the images working+ # posit-2022.0.1.1    * Fixed loss of precision bug in some of the Floating instances (exp,sin,cos)-  * Added a Charting test; command to run: stack test posit:test-posit-functions+  * Added a Chart test; command to run: stack test posit:test-posit-functions   * Added test results to the README.md file  # posit-2022.0.1.0
README.md view
@@ -1,4 +1,4 @@-# posit 2022.0.1.3+# posit 2022.0.1.4  The [Posit Standard 2022](https://posithub.org/docs/posit_standard-2.pdf), and [Posit Standard 3.2](https://posithub.org/docs/posit_standard.pdf), @@ -144,4 +144,5 @@  Number of Accurate Bits `atanh`: ![numberOfAccuarateBits atanh](https://raw.githubusercontent.com/waivio/posit/posit-2022/test/Results/Bits%20Accuracy%20of%20atanh%20with%20P16%20and%20Posit16.png)+ 
posit.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           posit-version:        2022.0.1.3+version:        2022.0.1.4 description:    The Posit Number format attempting to conform to the Posit Standard Versions 3.2 and 2022.  Where Real numbers are approximated by `Maybe Rational` and sampled in a similar way to the projective real line. homepage:       https://github.com/waivio/posit#readme bug-reports:    https://github.com/waivio/posit/issues@@ -14,8 +14,8 @@ tested-with:         GHC == 8.10.4,                      GHC == 8.10.7,                      GHC == 9.0.2,-                     GHC == 9.2.7,-                     GHC == 9.4.4,+                     GHC == 9.2.8,+                     GHC == 9.4.5,                      GHC == 9.6.2 synopsis:       Posit Numbers extra-source-files:
src/Posit.hs view
@@ -747,7 +747,6 @@ approx_sin (R x) = normalizedSine (R x')   where     (_, x') = properFraction $ x / twoPi-    R twoPi :: Posit es = 2 * approx_pi   approx_cos :: forall es. PositC es => Posit es -> Posit es@@ -756,7 +755,6 @@ approx_cos (R x) = normalizedCosine (R x')   where     (_, x') = properFraction $ x / twoPi-    R twoPi :: Posit es = 2 * approx_pi   approx_asin :: PositC es => Posit es -> Posit es@@ -788,7 +786,7 @@   | abs x < 1/2^122 = x  -- small angle approximaiton, found emperically   | x < 0 = negate.approx_atan $ negate x  -- if negative turn it positive, it reduces the other domain reductions by half, found from Universal CORDIC   | x > 1 = approx_pi/2 - approx_atan (recip x)  -- if larger than one use the complementary angle, found from Universal CORDIC-  | x > twoMsqrt3 = approx_pi/6 + approx_atan ((approx_sqrt 3 * x - 1)/(approx_sqrt 3 + x))  -- another domain reduction, using an identity, found from https://mathonweb.com/help_ebook/html/algorithms.htm+  | x > twoMsqrt3 = approx_pi/6 + approx_atan ((sqrt3 * x - 1)/(sqrt3 + x))  -- another domain reduction, using an identity, found from https://mathonweb.com/help_ebook/html/algorithms.htm   | otherwise = taylor_approx_atan x  @@ -1040,9 +1038,13 @@ --  twoMsqrt3 :: PositC es => Posit es-twoMsqrt3 = 2 - approx_sqrt 3+twoMsqrt3 = 0.2679491924311227064725536584941276330571947461896193719441930205480669830911999629188538132427514243243738585845932969700300549 +sqrt3 :: PositC es => Posit es+sqrt3 = 1.7320508075688772935274463415058723669428052538103806280558069794519330169088000370811461867572485756756261414154067030299699450 +twoPi :: Rational+twoPi = 6.2831853071795864769252867665590057683943387987502116419498891846156328125724179972560696506842341359642961730265646132941876892  -- ===================================================================== --    Helper Funcitons
stack.yaml view
@@ -1,12 +1,12 @@ # This file is attempting to maintain the working Liquid Haskell versions # that coorispond to a specific GHC or Stackage version -# resolver: nightly-2023-06-26  # ghc-9.6.2-resolver: lts-21.0 # ghc-2.4.5+# resolver: nightly-2023-07-06  # ghc-9.6.2+resolver: lts-21.1 # ghc-9.4.5 # resolver: lts-20.26 # ghc-9.2.8 # resolver: lts-19.33 # ghc-9.0.2 # resolver: lts-18.28 # ghc-8.10.7-# resolver: lts-18.6 # ghc-8.10.4 +# resolver: lts-18.6 # ghc-8.10.4 # Error: [S-7441] # resolver: lts-16.31 # ghc-8.8.4 # Fails To Build! ghc: panic! (the 'impossible' happened) # resolver: lts-14.27 # ghc-8.6.5 # Fails To Build! ghc: panic! (the 'impossible' happened) packages: