Changeset 34116 in project


Ignore:
Timestamp:
05/30/17 00:55:45 (4 weeks ago)
Author:
kon
Message:

julian arith edits

Location:
release/4/srfi-19
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/srfi-19/tags/3.4.2/srfi-19-support.scm

    r33883 r34116  
    296296(include "srfi-19-common")
    297297
    298 ;;;NOTE the use of syntax for inlining is an experiment. no procedure w/ arithmetic can
    299 ;;;be exported as syntax.
     298;;;NOTE the use of syntax for inlining is an experiment. no procedure w/
     299;;;arithmetic can be exported as syntax.
    300300;;
    301301;; For storage savings since some aritmetic routines do not
     
    324324            (if (fixnum? x)
    325325              x
    326               (##core#inline "C_double_to_number" (exact->inexact x))) ) ) ) ) ) )
     326              (if (inexact? x)
     327                (##core#inline "C_double_to_number" x)
     328                x ) ) ) ) ) ) ) )
    327329
    328330;;; Timing Routines
     
    10671069                  (let ((yr ?yr))
    10681070        (and
    1069           (not (fx= (fxmod yr 4000) 0)) ;Not officially adopted!
     1071          #; ;Not officially adopted!
     1072          (not (fx= (fxmod yr 4000) 0))
    10701073          (or
    10711074            (fx= (fxmod yr 400) 0)
     
    16661669  (if (or (fx< n 0) (fx>= n 100))
    16671670    n
    1668     (let* ((current-year (%date-year (tm:current-date tzi)))
    1669            (current-century (fx* (fx/ current-year 100) 100)))
    1670       (if (fx<= (fx- (fx+ current-century n) current-year) 50)
     1671    (let* ((current-year (%date-year (tm:current-date tzi)) )
     1672           (current-century (fx* (fx/ current-year 100) 100) )
     1673           (X (fx- (fx+ current-century n) current-year) ) )
     1674      (if (fx<= X 50)
    16711675        (fx+ current-century n)
    16721676        (fx+ (fx- current-century 100) n) ) ) ) )
     
    17371741;; Julian-day Operations
    17381742
    1739 (define (julian-day? obj) (real? obj))
     1743(define (julian-day? obj)
     1744  (real? obj) )
    17401745
    17411746(define-check+error-type julian-day)
     
    17521757  (let ((jdn
    17531758          (tm:encode-julian-day-number dy mn yr))
    1754         (time-seconds
     1759        (timsecs
    17551760          (+
    17561761            (fx+
     
    17591764                (fx+ (fx* min SEC/MIN) sec))
    17601765              (fxneg tzo))
    1761               (/ ns NS/S))) )
    1762     (+ (- jdn ONE-HALF) (/ time-seconds SEC/DY)) ) )
     1766            (/ ns NS/S))) )
     1767    (+ (- jdn ONE-HALF) (/ timsecs SEC/DY)) ) )
    17631768
    17641769#; ; inexact version
  • release/4/srfi-19/tags/3.4.2/srfi-19.setup

    r33883 r34116  
    1212(install-srfi-29-bundle 'srfi-19 'pt 'br)
    1313
    14 (setup-shared-extension-module 'srfi-19-timezone (extension-version "3.4.1")
     14(setup-shared-extension-module 'srfi-19-timezone (extension-version "3.4.2")
    1515        #:inline? #t
    1616        #:types? #t
    1717  #:compile-options '(-fixnum-arithmetic -optimize-level 3 -no-procedure-checks))
    1818
    19 (setup-shared-extension-module 'srfi-19-support (extension-version "3.4.1")
     19(setup-shared-extension-module 'srfi-19-support (extension-version "3.4.2")
    2020        #:inline? #t
    2121        #:types? #t
     
    2424    -no-procedure-checks -no-bound-checks -no-argc-checks))
    2525
    26 (setup-shared-extension-module 'srfi-19-time (extension-version "3.4.1")
     26(setup-shared-extension-module 'srfi-19-time (extension-version "3.4.2")
    2727        #:inline? #t
    2828        #:types? #t
    2929  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3030
    31 (setup-shared-extension-module 'srfi-19-date (extension-version "3.4.1")
     31(setup-shared-extension-module 'srfi-19-date (extension-version "3.4.2")
    3232        #:inline? #t
    3333        #:types? #t
    3434  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3535
    36 (setup-shared-extension-module 'srfi-19-io (extension-version "3.4.1")
     36(setup-shared-extension-module 'srfi-19-io (extension-version "3.4.2")
    3737        #:inline? #t
    3838        #:types? #t
    3939  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4040
    41 (setup-shared-extension-module 'srfi-19-period (extension-version "3.4.1")
     41(setup-shared-extension-module 'srfi-19-period (extension-version "3.4.2")
    4242        #:inline? #t
    4343        #:types? #t
    4444  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4545
    46 (setup-shared-extension-module 'srfi-19-core (extension-version "3.4.1")
     46(setup-shared-extension-module 'srfi-19-core (extension-version "3.4.2")
    4747        #:inline? #t
    4848        #:types? #t
    4949  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    5050
    51 (setup-shared-extension-module 'srfi-19 (extension-version "3.4.1")
     51(setup-shared-extension-module 'srfi-19 (extension-version "3.4.2")
    5252        #:inline? #t
    5353        #:types? #t
  • release/4/srfi-19/trunk/srfi-19-support.scm

    r33883 r34116  
    296296(include "srfi-19-common")
    297297
    298 ;;;NOTE the use of syntax for inlining is an experiment. no procedure w/ arithmetic can
    299 ;;;be exported as syntax.
     298;;;NOTE the use of syntax for inlining is an experiment. no procedure w/
     299;;;arithmetic can be exported as syntax.
    300300;;
    301301;; For storage savings since some aritmetic routines do not
     
    324324            (if (fixnum? x)
    325325              x
    326               (##core#inline "C_double_to_number" (exact->inexact x))) ) ) ) ) ) )
     326              (if (inexact? x)
     327                (##core#inline "C_double_to_number" x)
     328                x ) ) ) ) ) ) ) )
    327329
    328330;;; Timing Routines
     
    10671069                  (let ((yr ?yr))
    10681070        (and
    1069           (not (fx= (fxmod yr 4000) 0)) ;Not officially adopted!
     1071          #; ;Not officially adopted!
     1072          (not (fx= (fxmod yr 4000) 0))
    10701073          (or
    10711074            (fx= (fxmod yr 400) 0)
     
    16661669  (if (or (fx< n 0) (fx>= n 100))
    16671670    n
    1668     (let* ((current-year (%date-year (tm:current-date tzi)))
    1669            (current-century (fx* (fx/ current-year 100) 100)))
    1670       (if (fx<= (fx- (fx+ current-century n) current-year) 50)
     1671    (let* ((current-year (%date-year (tm:current-date tzi)) )
     1672           (current-century (fx* (fx/ current-year 100) 100) )
     1673           (X (fx- (fx+ current-century n) current-year) ) )
     1674      (if (fx<= X 50)
    16711675        (fx+ current-century n)
    16721676        (fx+ (fx- current-century 100) n) ) ) ) )
     
    17371741;; Julian-day Operations
    17381742
    1739 (define (julian-day? obj) (real? obj))
     1743(define (julian-day? obj)
     1744  (real? obj) )
    17401745
    17411746(define-check+error-type julian-day)
     
    17521757  (let ((jdn
    17531758          (tm:encode-julian-day-number dy mn yr))
    1754         (time-seconds
     1759        (timsecs
    17551760          (+
    17561761            (fx+
     
    17591764                (fx+ (fx* min SEC/MIN) sec))
    17601765              (fxneg tzo))
    1761               (/ ns NS/S))) )
    1762     (+ (- jdn ONE-HALF) (/ time-seconds SEC/DY)) ) )
     1766            (/ ns NS/S))) )
     1767    (+ (- jdn ONE-HALF) (/ timsecs SEC/DY)) ) )
    17631768
    17641769#; ; inexact version
  • release/4/srfi-19/trunk/srfi-19.setup

    r33883 r34116  
    1212(install-srfi-29-bundle 'srfi-19 'pt 'br)
    1313
    14 (setup-shared-extension-module 'srfi-19-timezone (extension-version "3.4.1")
     14(setup-shared-extension-module 'srfi-19-timezone (extension-version "3.4.2")
    1515        #:inline? #t
    1616        #:types? #t
    1717  #:compile-options '(-fixnum-arithmetic -optimize-level 3 -no-procedure-checks))
    1818
    19 (setup-shared-extension-module 'srfi-19-support (extension-version "3.4.1")
     19(setup-shared-extension-module 'srfi-19-support (extension-version "3.4.2")
    2020        #:inline? #t
    2121        #:types? #t
     
    2424    -no-procedure-checks -no-bound-checks -no-argc-checks))
    2525
    26 (setup-shared-extension-module 'srfi-19-time (extension-version "3.4.1")
     26(setup-shared-extension-module 'srfi-19-time (extension-version "3.4.2")
    2727        #:inline? #t
    2828        #:types? #t
    2929  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3030
    31 (setup-shared-extension-module 'srfi-19-date (extension-version "3.4.1")
     31(setup-shared-extension-module 'srfi-19-date (extension-version "3.4.2")
    3232        #:inline? #t
    3333        #:types? #t
    3434  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3535
    36 (setup-shared-extension-module 'srfi-19-io (extension-version "3.4.1")
     36(setup-shared-extension-module 'srfi-19-io (extension-version "3.4.2")
    3737        #:inline? #t
    3838        #:types? #t
    3939  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4040
    41 (setup-shared-extension-module 'srfi-19-period (extension-version "3.4.1")
     41(setup-shared-extension-module 'srfi-19-period (extension-version "3.4.2")
    4242        #:inline? #t
    4343        #:types? #t
    4444  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4545
    46 (setup-shared-extension-module 'srfi-19-core (extension-version "3.4.1")
     46(setup-shared-extension-module 'srfi-19-core (extension-version "3.4.2")
    4747        #:inline? #t
    4848        #:types? #t
    4949  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    5050
    51 (setup-shared-extension-module 'srfi-19 (extension-version "3.4.1")
     51(setup-shared-extension-module 'srfi-19 (extension-version "3.4.2")
    5252        #:inline? #t
    5353        #:types? #t
Note: See TracChangeset for help on using the changeset viewer.