Closed christianp closed 2 years ago
This may be related to #942 ?
@aarchiba no, I don't think this is related: the problem was that the wiggle room didn't scale with the given number. Your issue is asking for more precision than JS's number type can give, so you want to avoid the wiggle room entirely by using the decimal
data type. I'll explain in detail in that issue.
When the answer is
precround(4^7.9,1) = 57052.4
, the1e-12
wiggle room added byNumberEntryPart.getCorrectAnswer
has no effect: it's smaller than the underlying float can represent.In JS:
(57052.4 - 1e-12) == 57052.4
returnstrue
.I think that we instead need to change the 12th significant digit, instead of the 12th decimal place.