Changeset 32751 in project


Ignore:
Timestamp:
08/29/15 22:13:24 (4 years ago)
Author:
Kon Lovett
Message:

argvector patch per Peter Bex Aug 29 '15

Location:
release/4/mathh
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/mathh/tags/2.2.5/mathh-constants.scm

    r13570 r32751  
    66
    77;; The precision is greater than those found in <math.h>
     8;; but in practice not perfectly representable
    89
    910(define-constant E                                      2.7182818284590452353602874713526624977572)   ; e
  • release/4/mathh/tags/2.2.5/mathh.scm

    r30540 r32751  
    22;;;; Kon Lovett & John Cowen, '07 - '08
    33;;;; Kon Lovett, Mar '09 - '10
     4;;;; Peter Bex, Aug '15
    45
    56;;; Provides access to ISO C math functions in <math.h>
     
    4647#include <math.h>
    4748
     49/* C_cpsproc is only defined for argvector chickens */
     50#ifdef C_cpsproc
     51# define ARGVECTOR_CHICKEN
     52#endif
     53
    4854#if defined(_WIN32)
    4955static double
     
    245251      (let ((lnb (log b)))
    246252        (lambda (n)
    247           ((foreign-lambda* double ((double x) (double lnb)) "return( log( x ) / lnb );") n lnb)) ) ) ) )
     253          ((foreign-lambda* double ((double x) (double lnb))
     254            "return( log( x ) / lnb );") n lnb)) ) ) ) )
    248255
    249256;; Flonum remainder
     
    259266  C_word value1  = C_flonum( &values, ipart );
    260267  C_word value2  = C_flonum( &values, result );
     268#ifdef ARGVECTOR_CHICKEN
     269  C_word av[4] = { C_SCHEME_UNDEFINED, C_k, value1, value2 };
     270  C_values( 4, av );
     271#else
    261272  C_values( 4, C_SCHEME_UNDEFINED, C_k, value1, value2 );
     273#endif
    262274  ") )
    263275
     
    270282  C_word value1 = C_flonum( &values, result );
    271283  C_word value2 = C_fix( exp );
     284#ifdef ARGVECTOR_CHICKEN
     285  C_word av[4] = { C_SCHEME_UNDEFINED, C_k, value1, value2 };
     286  C_values( 4, av );
     287#else
    272288  C_values( 4, C_SCHEME_UNDEFINED, C_k, value1, value2 );
     289#endif
    273290  ") )
    274291
  • release/4/mathh/tags/2.2.5/mathh.setup

    r30540 r32751  
    1818      (else     '() ) ) ) )
    1919
    20 (setup-shared+static-extension-module (extension-name) (extension-version "2.2.4")
     20(setup-shared+static-extension-module (extension-name) (extension-version "2.2.5")
    2121  #:inline? #t
    2222  #:types? #t
  • release/4/mathh/trunk/mathh-constants.scm

    r13570 r32751  
    66
    77;; The precision is greater than those found in <math.h>
     8;; but in practice not perfectly representable
    89
    910(define-constant E                                      2.7182818284590452353602874713526624977572)   ; e
  • release/4/mathh/trunk/mathh.scm

    r30540 r32751  
    22;;;; Kon Lovett & John Cowen, '07 - '08
    33;;;; Kon Lovett, Mar '09 - '10
     4;;;; Peter Bex, Aug '15
    45
    56;;; Provides access to ISO C math functions in <math.h>
     
    4647#include <math.h>
    4748
     49/* C_cpsproc is only defined for argvector chickens */
     50#ifdef C_cpsproc
     51# define ARGVECTOR_CHICKEN
     52#endif
     53
    4854#if defined(_WIN32)
    4955static double
     
    245251      (let ((lnb (log b)))
    246252        (lambda (n)
    247           ((foreign-lambda* double ((double x) (double lnb)) "return( log( x ) / lnb );") n lnb)) ) ) ) )
     253          ((foreign-lambda* double ((double x) (double lnb))
     254            "return( log( x ) / lnb );") n lnb)) ) ) ) )
    248255
    249256;; Flonum remainder
     
    259266  C_word value1  = C_flonum( &values, ipart );
    260267  C_word value2  = C_flonum( &values, result );
     268#ifdef ARGVECTOR_CHICKEN
     269  C_word av[4] = { C_SCHEME_UNDEFINED, C_k, value1, value2 };
     270  C_values( 4, av );
     271#else
    261272  C_values( 4, C_SCHEME_UNDEFINED, C_k, value1, value2 );
     273#endif
    262274  ") )
    263275
     
    270282  C_word value1 = C_flonum( &values, result );
    271283  C_word value2 = C_fix( exp );
     284#ifdef ARGVECTOR_CHICKEN
     285  C_word av[4] = { C_SCHEME_UNDEFINED, C_k, value1, value2 };
     286  C_values( 4, av );
     287#else
    272288  C_values( 4, C_SCHEME_UNDEFINED, C_k, value1, value2 );
     289#endif
    273290  ") )
    274291
  • release/4/mathh/trunk/mathh.setup

    r30540 r32751  
    1818      (else     '() ) ) ) )
    1919
    20 (setup-shared+static-extension-module (extension-name) (extension-version "2.2.4")
     20(setup-shared+static-extension-module (extension-name) (extension-version "2.2.5")
    2121  #:inline? #t
    2222  #:types? #t
Note: See TracChangeset for help on using the changeset viewer.