> On Oct 17, 2018, at 2:11 PM, Jordan Johnson <j...@fellowhuman.com> wrote:
> 
> 
>> On Oct 17, 2018, at 10:35, Matthias Felleisen <matth...@felleisen.org> wrote:
>>>     (check-expect (+ 10 .25) 10.25)
>>> 
>>> errors with check-expect’s message about not comparing inexact numbers, but 
>>> in DrRacket+BSL the decimals are treated as exact numbers.
>>> 
>>> What do I need to change in the checker, in order to obtain the same 
>>> numeric behavior as in DrRacket?
>> Set read-decimal-as-inexact might solve the problem. 
> 
> Progress! But not completely solved. By adding 
> (read-decimal-as-inexact #f)
> to the checker module, I now don’t get the check-expect error. Instead, I’m 
> seeing
> submit error: your code failed a test: (hour-angle 12 20 30) evaluated to 
> 41/4, expecting 10.25
> 
> produced by the checker line
> (!test (hour-angle 12 20 30) 10.25)
> where hour-angle computes exactly.
> 
> So, what aspect of the language config would be responsible for 41/4 not 
> equaling 10.25?


Hmph: 
 
Welcome to Racket v7.0.0.20.
> (= 41/4 10.25)
#t
> (read-decimal-as-inexact #f)
> (= 41/4 10.25)
#t


Do you perhaps print and read the result? 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to