Skip to content

How will rational number be implemented? #151

Answered by wmedrano
amano-kenji asked this question in Q&A
Discussion options

You must be logged in to vote

Update: Related PR #155

Steel newbie here but under the hood, it will probably be a combination Rational32 and BigRational. As for behavior:

(+ 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

Replies: 2 comments 21 replies

Comment options

You must be logged in to vote
18 replies
@amano-kenji
Comment options

@mattwparas
Comment options

@amano-kenji
Comment options

@wmedrano
Comment options

@amano-kenji
Comment options

Answer selected by mattwparas
Comment options

You must be logged in to vote
3 replies
@mattwparas
Comment options

@amano-kenji
Comment options

@mattwparas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants