File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 478478 (define cond-x (abs yfl))
479479 (define cond-y (abs (* yfl (log xfl))))
480480
481+ (define cond-x.l (logabs ylog))
482+ (define cond-y.l (logabs (log* ylog (logln xlog))))
483+
481484 (cond
482485 ;; Hallucination:
483486 ;; x has a large exponent and y is 1. The ylogx is large but there is
517520
518521 [(and (overflow? xlog) (<= se MAX-EXP)) (mark-erroneous! subexpr 'oflow-rescue )]
519522
520- [(and (or (> cond-x 100 ) (> cond-y 100 )) (not (constant? y-ex)))
523+ [(and (or (log > cond-x.l 100.l ) (log > cond-y.l 100.l )) (not (constant? y-ex)))
521524 (mark-erroneous! subexpr 'sensitivity )]
522525
523- [(and (or (> cond-x 32 ) (> cond-y 32 )) (not (constant? y-ex)))
526+ [(and (or (log > cond-x.l 32.l ) (log > cond-y.l 32.l )) (not (constant? y-ex)))
524527 (mark-maybe! subexpr 'sensitivity )]
525528
526529 [else #f ])]
Original file line number Diff line number Diff line change 123123 #true
124124 (* a (fllog2 euler.0))))
125125
126+ (define (logexpt A B)
127+ (match-define (logfl a sa ea) A)
128+ (match-define (logfl b sb eb) B)
129+ (logfl (exp a)
130+ (>= (expt a b) 0.0 )
131+ (* a (fllog2 b))))
132+
126133(define (logsqrt A)
127134 (match-define (logfl a sa ea) A)
128135 (logfl (sqrt a)
193200 ['log/ log/]
194201 ['logln logln]
195202 ['logexp logexp]
196- ; ['logexpt logexpt]
203+ ['logexpt logexpt]
197204 ['logsin logsin]
198205 ['logcos logcos]
199206 ['logtan logtan]
You can’t perform that action at this time.
0 commit comments