Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test^js failed with a float precision error #9

Closed
chr15m opened this issue Feb 27, 2015 · 2 comments
Closed

Make test^js failed with a float precision error #9

chr15m opened this issue Feb 27, 2015 · 2 comments

Comments

@chr15m
Copy link
Contributor

chr15m commented Feb 27, 2015

TEST: (/ (- (+ 515 (* 222 311)) 300) 41) -> ['','1689'] -> FAIL (line 15):
    Expected : '(/ (- (+ 515 (* 222 311)) 300) 41)\r\n1689'
    Got      : '(/ (- (+ 515 (* 222 311)) 300) 41)\r\n1689.1951219512196'
@chr15m
Copy link
Contributor Author

chr15m commented Feb 27, 2015

~/dev/mal/js$ node stepA_interop.js 
Mal [javascript]
user> (/ (- (+ 515 (* 222 311)) 300) 41)
1689.1951219512196
user> (* 222 311)
69042
user> (+ 515 (* 222 311))
69557
user> (- (+ 515 (* 222 311)) 300)
69257
user> (/ (- (+ 515 (* 222 311)) 300) 41)
1689.1951219512196

Ah:

~/dev/mal/js$ node
> 69257 / 41
1689.1951219512196

Way to go, Javascript.

@kanaka kanaka closed this as completed in 90ab317 Feb 28, 2015
@kanaka
Copy link
Owner

kanaka commented Feb 28, 2015

I didn't want to force integer results so I changed the test to result in whole number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants