How will rational number be implemented? #151
-
Will it be implemented as haskell's Decimal library or Raku's Rat type or something else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 21 replies
-
Update: Related PR #155
(+ 1/5 4/5) ;; 1
(- 1 1/5) ;; 4/5
(/ 4 5) ;; 4/5
(* 2/3 5/7) ;; 10/21
(+ 1/5 0.8) ;; 1.0 |
Beta Was this translation helpful? Give feedback.
-
I apologize in advance if I am off-topic but would valids and posits (formerly known as unum) be worth implementing? It is said to be more performant and accurate than floating point numbers and integers based on IEEE-754 specification.
And last but not least, the posit standard from march 2022: https://posithub.org/khub_doc |
Beta Was this translation helpful? Give feedback.
Update: Related PR #155
Steel
newbie here but under the hood, it will probably be a combinationRational32
andBigRational
. As for behavior: