Changeset 39399 in project


Ignore:
Timestamp:
11/27/20 17:54:38 (5 months ago)
Author:
Kon Lovett
Message:

compensate for apply cliff in histograph

Location:
release/5/slib-charplot/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/5/slib-charplot/trunk/charplot.scm

    r38404 r39399  
    220220(define (histobins data plot-width)
    221221  (define datcnt (length data))
    222   (define xmax (apply max data))
    223   (define xmin (apply min data))
     222  (define xmax)
     223  (define xmin)
     224  (cond-expand
     225    ;FIXME C5 apply of > ~40k is ... exponential?
     226    (chicken
     227      (let ()
     228        (import (only (chicken base) define-constant foldl))
     229        (define OFF-CLIFF 32764)
     230        (set! xmax (if (< 100 OFF-CLIFF) (foldl max (car data) (cdr data)) (apply max data)))
     231        (set! xmin (if (< 100 OFF-CLIFF) (foldl min (car data) (cdr data)) (apply min data))) ) )
     232    (else
     233      (set! xmax (apply max data))
     234      (set! xmin (apply min data)) ) )
    224235  (if (null? data)
    225236      '()
  • release/5/slib-charplot/trunk/slib-charplot.egg

    r38873 r39399  
    33
    44((synopsis "The SLIB character plotting library")
    5  (version "1.1.1")
     5 (version "1.1.2")
    66 (author "Aubrey Jaffer")
    77 (maintainer "[[kon lovett]]")
  • release/5/slib-charplot/trunk/slib-compat.scm

    r38720 r39399  
    5959        (kwd (string->keyword (symbol->string x)))
    6060        (fs (features)) )
    61         (and
    62           (cond
    63             ((memq kwd fs))
    64             ((and (memq x +numeric+) (memq #:full-numeric-tower fs)))
    65             ((memq x +builtins+))
    66             (else #f) )
    67             #t ) ) ) ) )
     61        (cond
     62          ((memq kwd fs))
     63          ((and (memq x +numeric+) (memq #:full-numeric-tower fs)))
     64          ((memq x +builtins+))
     65          (else #f) ) ) ) ) )
    6866
    6967(define (require x)
Note: See TracChangeset for help on using the changeset viewer.