Changeset 36246 in project


Ignore:
Timestamp:
08/13/18 04:25:38 (6 weeks ago)
Author:
kon
Message:

add modf*, rel 4.2.0

Location:
release/5/mathh
Files:
3 edited
4 copied

Legend:

Unmodified
Added
Removed
  • release/5/mathh/tags/4.2.0/mathh.egg

    r36243 r36246  
    33
    44((synopsis "ISO C math functions and constants")
    5  (version "4.1.0")
     5 (version "4.2.0")
    66 (category math)
    77 (author "[[kon lovett]] and [[john cowan]]")
  • release/5/mathh/tags/4.2.0/mathh.scm

    r36243 r36246  
    101101  log10 log2 log1p
    102102  log-with-base log/base
    103   modf frexp
     103  modf modf* frexp
    104104  ldexp scalbn
    105105  cosh sinh tanh
     
    325325  C_values( 4, av );
    326326  ") )
     327
     328(: modf* (float --> integer float))
     329;
     330(define (modf* x)
     331  (let-values (((i f) (modf x)))
     332    (values (inexact->exact i) f) ) )
    327333
    328334;; Return mantissa & exponent (as multiple values) of a flonum
  • release/5/mathh/tags/4.2.0/tests/mathh-test.scm

    r36243 r36246  
    4141
    4242        (test (values 5.0 0.5) (modf 5.5))
     43        (test (values 5 0.5) (modf* 5.5))
    4344
    4445        (test 20.0 (ldexp 5.0 2))
  • release/5/mathh/trunk/mathh.egg

    r36243 r36246  
    33
    44((synopsis "ISO C math functions and constants")
    5  (version "4.1.0")
     5 (version "4.2.0")
    66 (category math)
    77 (author "[[kon lovett]] and [[john cowan]]")
  • release/5/mathh/trunk/mathh.scm

    r36243 r36246  
    101101  log10 log2 log1p
    102102  log-with-base log/base
    103   modf frexp
     103  modf modf* frexp
    104104  ldexp scalbn
    105105  cosh sinh tanh
     
    325325  C_values( 4, av );
    326326  ") )
     327
     328(: modf* (float --> integer float))
     329;
     330(define (modf* x)
     331  (let-values (((i f) (modf x)))
     332    (values (inexact->exact i) f) ) )
    327333
    328334;; Return mantissa & exponent (as multiple values) of a flonum
  • release/5/mathh/trunk/tests/mathh-test.scm

    r36243 r36246  
    4141
    4242        (test (values 5.0 0.5) (modf 5.5))
     43        (test (values 5 0.5) (modf* 5.5))
    4344
    4445        (test 20.0 (ldexp 5.0 2))
Note: See TracChangeset for help on using the changeset viewer.