Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: real to rational number Date: Thu, 20 Apr 2017 18:52:53 -0700 Organization: A noiseless patient Spider Lines: 9 Message-ID: <87shl2cyru.fsf@nightsong.com> References: <87efwpf7cw.fsf@nightsong.com> <718428df-9808-4765-a9a1-48d43a971d24@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="e5d0a0326cb43fdd52c9145868e77c01"; logging-data="27874"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ykxzw0TeDV4nQO6zdVMmf" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:vtclcar78mSimb6j5dXavI3/qj4= sha1:8yV6JpkY1QqStMcXZbAqlRw+/gU= Xref: csiph.com comp.lang.forth:57679 krishna.myneni@ccreweb.org writes: > In some instances, such as for the squares of the Wigner 3-j symbols, > we know in advance that the results are rational numbers. However, on > a computer, they are often calculated in such a way to give a floating > point number and it is difficult to find the corresponding rational > number by hand. You could use mpfr and do the calculation in exact rational arithmetic from the beginning.