On Wed, Oct 17, 2018 at 1:12 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) >
Would it help if in the check module you use `=' as the equality test, or specify #e10.25 instead? > where hour-angle computes exactly. > > So, what aspect of the language config would be responsible for 41/4 not > equaling 10.25? > > Best, > Jordan > > -- > 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. -- 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.