Cool, thanks!
 
15.03.2017, 17:27, "John Benediktsson" <mrj...@gmail.com>:
You could use ``1 mod`` to get the fractional part... which is actually what ``truncate`` uses in its implementation.
 
On Wed, Mar 15, 2017 at 5:24 AM, Alexander Ilin <ajs...@yandex.ru> wrote:
Hello!

  Is there a library word to return the fractional part of a real number? Sort of like the following, except that it only works for positives:

: frac ( real -- fractional-part )
    dup floor - ;

---=====---
 Александр

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk
,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

,

_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

 
 
---=====---
Александр
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to