Changeset 35143 in project


Ignore:
Timestamp:
02/17/18 20:53:11 (4 months ago)
Author:
kon
Message:

reset rename antics , cover more "windows" defines , add MSYS2 issue

Location:
release/4/mathh/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/mathh/trunk/mathh.scm

    r35121 r35143  
    2020;; - 'gamma' is deprecated in favor of 'tgamma' but not available
    2121;; yet on some platforms, so we use 'gamma' for now.
     22;;
     23;; - http://www.davidegrayson.com/windev/msys2/ : doesn't define the _WIN32
     24;; preprocessor macro by default, but it will if you provide the -mwin32 options
    2225
    2326;;; Mathh
     
    5861# include <sunmath.h> /* log2 */
    5962
    60 #elif defined(_WIN32)
     63/* _WIN32 should be enough but ... */
     64#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(_WIN32) || defined(WIN32) || defined(__WIN32__) || defined(__MINGW64__) || defined(_WIN64) || defined(WIN64) || defined(__WIN64__)
    6165
    6266static double
    63 mm_log2( double x )
     67log2( double x )
    6468{
    6569# ifndef M_LN2
     
    7074
    7175static double
    72 mm_log1p( double x )
     76log1p( double x )
    7377{
    7478  /* very imprecise */
     
    7882/* from a Python implementation by John D. Cook */
    7983static double
    80 mm_erf( double x )
     84erf( double x )
    8185{
    8286# define A1 0.254829592
     
    105109
    106110static double
    107 mm_erfc( double x )
     111erfc( double x )
    108112{
    109113  /* very imprecise */
    110   return 1.0 - mm_erf( x );
     114  return 1.0 - erf( x );
    111115}
    112116
    113117static double
    114 mm_scalbn( double x, int n )
     118scalbn( double x, int n )
    115119{
    116120  /* not efficient */
     
    177181(define erf
    178182  (cond-expand
    179     (windows  (foreign-lambda double "mm_erf" double) )
     183    (windows  (foreign-lambda double "erf" double) )
    180184    (else     (foreign-lambda double "erf" double) ) ) )
    181185
    182186(define erfc
    183187  (cond-expand
    184     (windows  (foreign-lambda double "mm_erfc" double) )
     188    (windows  (foreign-lambda double "erfc" double) )
    185189    (else     (foreign-lambda double "erfc" double) ) ) )
    186190
     
    212216(define hypot
    213217  (cond-expand
    214     (windows  (foreign-lambda double "mm_hypot" double double) )
     218    (windows  (foreign-lambda double "hypot" double double) )
    215219    (else     (foreign-lambda double "hypot" double double) ) ) )
    216220
     
    241245(define log2
    242246  (cond-expand
    243     (windows  (foreign-lambda double "mm_log2" double) )
     247    (windows  (foreign-lambda double "log2" double) )
    244248    (else     (foreign-lambda double "log2" double) ) ) )
    245249
     
    248252(define log1p
    249253  (cond-expand
    250     (windows  (foreign-lambda double "mm_log1p" double) )
     254    (windows  (foreign-lambda double "log1p" double) )
    251255    (else     (foreign-lambda double "log1p" double) ) ) )
    252256
     
    259263(define scalbn
    260264  (cond-expand
    261     (windows  (foreign-lambda double "mm_scalbn" double integer) )
     265    (windows  (foreign-lambda double "scalbn" double integer) )
    262266    (else     (foreign-lambda double "scalbn" double integer) ) ) )
    263267
  • release/4/mathh/trunk/mathh.setup

    r35121 r35143  
    1212
    1313;* (The compiler option '-inline-global' causes problems; so no -O3+.)
    14 (setup-shared+static-extension-module (extension-name) (extension-version "3.3.1")
     14(setup-shared+static-extension-module (extension-name) (extension-version "3.3.2")
    1515  ;cannot be inline #1340
    1616  ;#:inline? #t
     
    1919  #:files '("mathh-constants.scm"))
    2020
    21 (setup-shared+static-extension-module 'mathh-consts (extension-version "3.3.1")
     21(setup-shared+static-extension-module 'mathh-consts (extension-version "3.3.2")
    2222  #:inline? #t
    2323  #:types? #t
     
    2727    -no-bound-checks -no-argc-checks -no-procedure-checks))
    2828
    29 (setup-shared+static-extension-module 'fp-utils (extension-version "3.3.1")
     29(setup-shared+static-extension-module 'fp-utils (extension-version "3.3.2")
    3030  #:inline? #t
    3131  #:types? #t
     
    3535    -no-procedure-checks))
    3636
    37 (setup-shared+static-extension-module 'fx-utils (extension-version "3.3.1")
     37(setup-shared+static-extension-module 'fx-utils (extension-version "3.3.2")
    3838  #:inline? #t
    3939  #:types? #t
Note: See TracChangeset for help on using the changeset viewer.