Hello,

Am 07.01.23 um 17:55 schrieb Ivan Krylov:
> What do you need the fractions for?
>

When writing tasks for statistics exams, I try to avoid non-terminal intermediate results. Students might round them and arrive at a final result that might be slightly different from the true value. Although the exam package supports a tolerance for checking the result, this could be problematic. To check if a number is non-terminal, I calculate a fraction representation and check if the denominator can be expressed by 2^p 5^q.

@Enrico: When I started developing assignments a few years ago, I was not familiar with gmp. :(

Thanks Sigbert

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to