Changeset 40469 in project


Ignore:
Timestamp:
09/08/21 23:55:07 (2 weeks ago)
Author:
Kon Lovett
Message:

allow fx %, new test runner

Location:
release/5/fp-utils/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/5/fp-utils/trunk/fp-inlines.scm

    r39390 r40469  
    1818  fplog2 fplog10
    1919  fpdegree->radian fpradian->degree
    20   fpprecision-factor fpprecision-epsilon)
     20  fpprecision-factor fpprecision-epsilon
     21  fp%)
    2122
    2223(import scheme)
     
    5556(: fpprecision-factor ((or float fixnum) #!optional float --> float))
    5657(: fpprecision-epsilon ((or float fixnum) #!optional float --> float))
    57 (: fp% (float float --> float))
     58(: fp% (float (or float fixnum) --> float))
    5859
    5960;;
     
    123124;;
    124125
    125 (define (fp% n p) (fp/ (fp* 100.0 n) (exact->inexact p)))
     126(define (fp% n p) (fp* n (fp* (exact->inexact p) .01)))
    126127
    127128) ;fp-inlines
  • release/5/fp-utils/trunk/fp-utils.egg

    r39898 r40469  
    33
    44((synopsis "fp utilities")
    5  (version "4.0.5")
     5 (version "4.0.6")
    66 (category math)
    77 (author "Kon Lovett")
  • release/5/fp-utils/trunk/tests/run.scm

    r39793 r40469  
    77    make-pathname pathname-file pathname-replace-directory pathname-strip-extension)
    88  (only (chicken process) system)
    9   (only (chicken process-context) command-line-arguments)
     9  (only (chicken process-context) command-line-arguments get-environment-variable)
    1010  (only (chicken format) format)
    1111  (only (chicken file) file-exists? find-files)
     
    1313
    1414;; Globals
     15
     16(define *csi* (or (get-environment-variable "CHICKEN_CSI") "csi"))
     17(define *csc* (or (get-environment-variable "CHICKEN_CSC") "csc"))
    1518
    1619(define *csc-init-options* '(
     
    7982
    8083(define (run-test-evaluated source)
    81   (format #t "*** csi ~A ***~%" (pathname-file source))
    82   (system-must (string-append "csi -s " source)) )
     84  (format #t "*** ~A ~A ***~%" *csi* (pathname-file source))
     85  (system-must (string-append *csi* " -s " source)) )
    8386
    8487(define (run-test-compiled source csc-options)
    8588  (let ((optstr (apply string-append (intersperse csc-options " "))))
    86     (format #t "*** csc ~A ~A ***~%" (pathname-file source) optstr)
     89    (format #t "*** ~A ~A ~A ***~%" *csc* (pathname-file source) optstr)
    8790    ;csc output is in current directory
    88     (system-must (string-append "csc" " " optstr " " source)) )
     91    (system-must (string-append *csc* " " optstr " " source)) )
    8992  (system-must (pathname-replace-directory (pathname-strip-extension source) *test-directory*)) )
    9093
Note: See TracChangeset for help on using the changeset viewer.