Rationals (not supported) cause Cyclone to give some confusing answers
jpellegrini opened this issue · 2 comments
jpellegrini commented
Hello!
I think I found another issue:
cyclone> (expt 81 1/4)
Error: ("Bad argument type" 81 #f) ;; Hm, perhaps the message could be clearer?
;; The #f refers to the 1/4 that Cyclone doesn't support right?
cyclone> (expt 81.0 1/4)
1.0 ;; Hm, nope. :)
cyclone> (expt 81.0 0.25)
3.0 ;; Ah, better!
So the rational seems to trigger some confusing behavior, no?
justinethier commented
Thanks for the report, you keep finding interesting edge cases! :)
justinethier commented
Enhanced the reader to recognize rationals, though they are stored internally as doubles rather than a distinct type:
cyclone> (expt 81 1/4)
3.0
cyclone> (expt 81.0 1/4)
3.0
cyclone> 1/4
0.25