Liste des Groupes | Revenir à cl forth |
On Sat, 6 Jul 2024 23:50:28 (UTC), Krishna Myneni wrote:The FROUND is necessary because 42!/21! is too large of an integer to be exactly represented by double-precision fp (IEEE format) and F>D is a truncating operation, not rounding.
On 7/6/24 16:59, Ahmed wrote:...: solution ( -- d)...
1 s>d 43 22 do i 1 m*/ loop d>f
21 dup s>d rot 2 do I 1 m*/ loop d>f
f/ fround f>d ;
>KrishnaYou have not to use fround. (42!/21!) is an integer and is multiple of
21!.
in other words 42! is multiple of (21!)^2.
Les messages affichés proviennent d'usenet.