Changeset 34098 in project


Ignore:
Timestamp:
05/28/17 20:47:30 (3 months ago)
Author:
kon
Message:

add fp-utils, mathh-consts

Location:
release/4/mathh
Files:
4 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/mathh/tags/3.1.0/mathh.meta

    r28419 r34098  
    99 (depends (setup-helper "1.5.2"))
    1010 (test-depends test)
    11  (files "mathh.scm" "mathh.meta" "mathh.setup" "mathh-constants.scm" "tests/run.scm") )
     11 (files "mathh.scm" "mathh.meta" "mathh.setup" "mathh-constants.scm" "mathh-consts.scm" "fp-utils.scm" "tests/run.scm") )
  • release/4/mathh/tags/3.1.0/mathh.scm

    r32757 r34098  
    2525(module mathh
    2626
    27   (;export
    28     fpclassify fpclass
    29     signbit
    30     copysign nextafter
    31     fpmod
    32     cbrt
    33     hypot
    34     log10 log2 make-log/base log1p
    35     modf frexp
    36     ldexp scalbn
    37     cosh sinh tanh
    38     acosh asinh atanh
    39     gamma tgamma lgamma
    40     bessel-j0 bessel-j1 bessel-jn
    41     bessel-y0 bessel-y1 bessel-yn
    42     erf erfc)
    43 
    44   (import scheme chicken foreign)
     27(;export
     28  fpclassify fpclass
     29  signbit
     30  copysign nextafter
     31  fpmod
     32  cbrt
     33  hypot
     34  log10 log2 make-log/base log1p
     35  modf frexp
     36  ldexp scalbn
     37  cosh sinh tanh
     38  acosh asinh atanh
     39  gamma tgamma lgamma
     40  bessel-j0 bessel-j1 bessel-jn
     41  bessel-y0 bessel-y1 bessel-yn
     42  erf erfc)
     43
     44(import scheme chicken foreign)
    4545
    4646#>
  • release/4/mathh/tags/3.1.0/mathh.setup

    r33624 r34098  
    1111      (else     '() ) ) ) )
    1212
    13 (setup-shared+static-extension-module (extension-name) (extension-version "3.0.0")
     13(setup-shared+static-extension-module (extension-name) (extension-version "3.1.0")
    1414  #:inline? #t
    1515  #:types? #t
    1616  #:compile-options mathh-compile-options
    1717  #:files '("mathh-constants.scm"))
     18
     19(setup-shared+static-extension-module 'fp-utils (extension-version "3.1.0")
     20  #:inline? #t
     21  #:types? #t
     22  #:compile-options `(-scrutinize -optimize-level 3 -debug-level 1 -no-procedure-checks))
     23
     24(setup-shared+static-extension-module 'mathh-consts (extension-version "3.1.0")
     25  #:inline? #t
     26  #:types? #t
     27  #:compile-options `(-scrutinize -optimize-level 3 -debug-level 1 -no-bound-checks -no-argc-checks -no-procedure-checks))
  • release/4/mathh/tags/3.1.0/tests/run.scm

    r28419 r34098  
    22
    33(require-extension test)
     4
    45(require-extension mathh)
    5 
    6 (include "mathh-constants")
    76
    87(test-group "ISO C Functions"
     
    4241)
    4342
    44 (test-group "Math Constants"
     43(test-group "BSD Functions"
    4544
    46         ; Well, some
    47         (test SQRT2 (sqrt 2.0))
    48         (test DEGREE (/ PI 180.0))
    49         (test LN2 (log 2.0))
    50         (test LOG2E (log2 E))
     45        (test-assert (signbit -1.0))
     46        (test-assert (not (signbit 1.0)))
     47        (test-assert (signbit -0.0))
     48
     49        (test -1.0 (copysign 1.0 -1.0))
     50        (test 1.0 (copysign -1.0 1.0))
     51
     52        (test 1.0 (nextafter 1.0 -1.0))
     53        (test -1.0 (nextafter -1.0 1.0))
     54
     55        (test 2.4662 (cbrt 15.0))
    5156)
    5257
     
    6974)
    7075
    71 (test-group "BSD Functions"
     76(require-extension mathh-consts)
    7277
    73         (test-assert (signbit -1.0))
    74         (test-assert (not (signbit 1.0)))
    75         (test-assert (signbit -0.0))
     78(test-group "Math Constants"
    7679
    77         (test -1.0 (copysign 1.0 -1.0))
    78         (test 1.0 (copysign -1.0 1.0))
     80        ; Well, some
     81        (test sqrt2 (sqrt 2.0))
     82        (test degree (/ pi 180.0))
     83        (test ln2 (log 2.0))
     84        (test log2e (log2 e))
     85)
    7986
    80         (test 1.0 (nextafter 1.0 -1.0))
    81         (test -1.0 (nextafter -1.0 1.0))
     87(require-extension fp-utils)
    8288
    83         (test 2.4662 (cbrt 15.0))
     89(test-group "FP Utils"
     90
     91        (test-assert (fpzero? 0.0))
     92        (test-assert (fppositive? 1.0))
     93        (test-assert (fpnegative? -1.0))
     94        (test-assert (fpeven? 6.0))
     95        (test-assert (not (fpodd? 6.0)))
     96        (test-assert (fpodd? 7.0))
     97
     98        (test 27.0 (fpcub 3.0))
     99
     100        (test 1.0 (fpmodulo 5.0 2.0))
     101        (test 0.0 (fpmodulo 0.0 1.0))
     102
     103        (test 2.0 (fpquotient 5.0 2.0))
     104        (test 1.0 (fpremainder 5.0 2.0))
    84105)
    85106
  • release/4/mathh/trunk/mathh.meta

    r28419 r34098  
    99 (depends (setup-helper "1.5.2"))
    1010 (test-depends test)
    11  (files "mathh.scm" "mathh.meta" "mathh.setup" "mathh-constants.scm" "tests/run.scm") )
     11 (files "mathh.scm" "mathh.meta" "mathh.setup" "mathh-constants.scm" "mathh-consts.scm" "fp-utils.scm" "tests/run.scm") )
  • release/4/mathh/trunk/mathh.scm

    r32757 r34098  
    2525(module mathh
    2626
    27   (;export
    28     fpclassify fpclass
    29     signbit
    30     copysign nextafter
    31     fpmod
    32     cbrt
    33     hypot
    34     log10 log2 make-log/base log1p
    35     modf frexp
    36     ldexp scalbn
    37     cosh sinh tanh
    38     acosh asinh atanh
    39     gamma tgamma lgamma
    40     bessel-j0 bessel-j1 bessel-jn
    41     bessel-y0 bessel-y1 bessel-yn
    42     erf erfc)
    43 
    44   (import scheme chicken foreign)
     27(;export
     28  fpclassify fpclass
     29  signbit
     30  copysign nextafter
     31  fpmod
     32  cbrt
     33  hypot
     34  log10 log2 make-log/base log1p
     35  modf frexp
     36  ldexp scalbn
     37  cosh sinh tanh
     38  acosh asinh atanh
     39  gamma tgamma lgamma
     40  bessel-j0 bessel-j1 bessel-jn
     41  bessel-y0 bessel-y1 bessel-yn
     42  erf erfc)
     43
     44(import scheme chicken foreign)
    4545
    4646#>
  • release/4/mathh/trunk/mathh.setup

    r33624 r34098  
    1111      (else     '() ) ) ) )
    1212
    13 (setup-shared+static-extension-module (extension-name) (extension-version "3.0.0")
     13(setup-shared+static-extension-module (extension-name) (extension-version "3.1.0")
    1414  #:inline? #t
    1515  #:types? #t
    1616  #:compile-options mathh-compile-options
    1717  #:files '("mathh-constants.scm"))
     18
     19(setup-shared+static-extension-module 'fp-utils (extension-version "3.1.0")
     20  #:inline? #t
     21  #:types? #t
     22  #:compile-options `(-scrutinize -optimize-level 3 -debug-level 1 -no-procedure-checks))
     23
     24(setup-shared+static-extension-module 'mathh-consts (extension-version "3.1.0")
     25  #:inline? #t
     26  #:types? #t
     27  #:compile-options `(-scrutinize -optimize-level 3 -debug-level 1 -no-bound-checks -no-argc-checks -no-procedure-checks))
  • release/4/mathh/trunk/tests/run.scm

    r28419 r34098  
    22
    33(require-extension test)
     4
    45(require-extension mathh)
    5 
    6 (include "mathh-constants")
    76
    87(test-group "ISO C Functions"
     
    4241)
    4342
    44 (test-group "Math Constants"
     43(test-group "BSD Functions"
    4544
    46         ; Well, some
    47         (test SQRT2 (sqrt 2.0))
    48         (test DEGREE (/ PI 180.0))
    49         (test LN2 (log 2.0))
    50         (test LOG2E (log2 E))
     45        (test-assert (signbit -1.0))
     46        (test-assert (not (signbit 1.0)))
     47        (test-assert (signbit -0.0))
     48
     49        (test -1.0 (copysign 1.0 -1.0))
     50        (test 1.0 (copysign -1.0 1.0))
     51
     52        (test 1.0 (nextafter 1.0 -1.0))
     53        (test -1.0 (nextafter -1.0 1.0))
     54
     55        (test 2.4662 (cbrt 15.0))
    5156)
    5257
     
    6974)
    7075
    71 (test-group "BSD Functions"
     76(require-extension mathh-consts)
    7277
    73         (test-assert (signbit -1.0))
    74         (test-assert (not (signbit 1.0)))
    75         (test-assert (signbit -0.0))
     78(test-group "Math Constants"
    7679
    77         (test -1.0 (copysign 1.0 -1.0))
    78         (test 1.0 (copysign -1.0 1.0))
     80        ; Well, some
     81        (test sqrt2 (sqrt 2.0))
     82        (test degree (/ pi 180.0))
     83        (test ln2 (log 2.0))
     84        (test log2e (log2 e))
     85)
    7986
    80         (test 1.0 (nextafter 1.0 -1.0))
    81         (test -1.0 (nextafter -1.0 1.0))
     87(require-extension fp-utils)
    8288
    83         (test 2.4662 (cbrt 15.0))
     89(test-group "FP Utils"
     90
     91        (test-assert (fpzero? 0.0))
     92        (test-assert (fppositive? 1.0))
     93        (test-assert (fpnegative? -1.0))
     94        (test-assert (fpeven? 6.0))
     95        (test-assert (not (fpodd? 6.0)))
     96        (test-assert (fpodd? 7.0))
     97
     98        (test 27.0 (fpcub 3.0))
     99
     100        (test 1.0 (fpmodulo 5.0 2.0))
     101        (test 0.0 (fpmodulo 0.0 1.0))
     102
     103        (test 2.0 (fpquotient 5.0 2.0))
     104        (test 1.0 (fpremainder 5.0 2.0))
    84105)
    85106
Note: See TracChangeset for help on using the changeset viewer.