bug500, discussion (missed optimization)

Time bar (total: 8.4s)

start0.0ms (0%)

Memory
0.0MiB live, 0.0MiB allocated; 0ms collecting garbage

analyze128.0ms (1.5%)

Memory
12.7MiB live, 107.5MiB allocated; 35ms collecting garbage
Algorithm
search
Search
ProbabilityValidUnknownPreconditionInfiniteDomainCan'tIter
0%0%100%0%0%0%0%0
0%0%100%0%0%0%0%1
0%0%100%0%0%0%0%2
25%25%75%0%0%0%0%3
37.5%37.5%62.5%0%0%0%0%4
43.8%43.7%56.2%0%0%0%0%5
46.9%46.9%53.1%0%0%0%0%6
48.4%48.4%51.5%0%0%0%0%7
49.2%49.2%50.8%0%0%0%0%8
50.4%50.4%49.6%0%0%0%0%9
51%51%49%0%0%0%0%10
51.3%51.2%48.7%0%0%0%0%11
51.3%51.3%48.7%0%0%0%0%12
Compiler

Compiled 7 to 6 computations (14.3% saved)

sample7.3s (87.5%)

Memory
83.1MiB live, 6 741.3MiB allocated; 2.0s collecting garbage
Samples
3.8s7 760×5exit
2.2s5 587×2valid
406.0ms2 381×1valid
17.0ms288×0valid
Precisions
Click to see histograms. Total time spent on operations: 5.1s
ival-log: 2.6s (51.2% of total)
ival-sinh: 1.1s (22.4% of total)
adjust: 773.0ms (15.2% of total)
ival-div: 526.0ms (10.3% of total)
ival-true: 31.0ms (0.6% of total)
ival-assert: 18.0ms (0.4% of total)
Bogosity

explain190.0ms (2.3%)

Memory
36.3MiB live, 179.3MiB allocated; 14ms collecting garbage
FPErrors
Click to see full error table
Ground TruthOverpredictionsExampleUnderpredictionsExampleSubexpression
134117(-5.313799571049067e-201)0-(log.f64 (/.f64 (sinh.f64 x) x))
00-0-(sinh.f64 x)
00-0-(/.f64 (sinh.f64 x) x)
00-0-x
Explanations
Click to see full explanations table
OperatorSubexpressionExplanationCount
log.f64(log.f64 (/.f64 (sinh.f64 x) x))sensitivity2480
log.f64(log.f64 (/.f64 (sinh.f64 x) x))oflow-rescue30
(sinh.f64 x)overflow3
(/.f64 (sinh.f64 x) x)overflow3
Confusion
Predicted +Predicted -
+1340
-1175
Precision
0.5338645418326693
Recall
1.0
Confusion?
Predicted +Predicted MaybePredicted -
+13400
-11705
Precision?
0.5338645418326693
Recall?
1.0
Freqs
test
numberfreq
05
1251
Total Confusion?
Predicted +Predicted MaybePredicted -
+100
-000
Precision?
1.0
Recall?
1.0
Samples
121.0ms338×2valid
23.0ms150×1valid
1.0ms24×0valid
Compiler

Compiled 33 to 16 computations (51.5% saved)

Precisions
Click to see histograms. Total time spent on operations: 124.0ms
ival-log: 65.0ms (52.4% of total)
ival-sinh: 38.0ms (30.6% of total)
ival-div: 11.0ms (8.9% of total)
adjust: 10.0ms (8.1% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)

preprocess47.0ms (0.6%)

Memory
1.9MiB live, 45.8MiB allocated; 11ms collecting garbage
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
0615
11415
24015
310515
455615
5441811
045
045
045
Stop Event
saturated
saturated
saturated
node limit
Calls
Call 1
Inputs
(log.f64 (/.f64 (sinh.f64 x) x))
Outputs
(log.f64 (/.f64 (sinh.f64 x) x))
Symmetry

(abs x)

Compiler

Compiled 5 to 4 computations (20% saved)

eval0.0ms (0%)

Memory
0.1MiB live, 0.1MiB allocated; 0ms collecting garbage
Compiler

Compiled 0 to 1 computations (-∞% saved)

prune0.0ms (0%)

Memory
0.6MiB live, 0.6MiB allocated; 0ms collecting garbage
Alt Table
Click to see full alt table
StatusAccuracyProgram
53.6%
(log.f64 (/.f64 (sinh.f64 x) x))
Compiler

Compiled 5 to 4 computations (20% saved)

simplify3.0ms (0%)

Memory
2.9MiB live, 2.9MiB allocated; 0ms collecting garbage
Localize:

Found 3 expressions of interest:

NewMetricScoreProgram
cost-diff0
(sinh.f64 x)
cost-diff0
(/.f64 (sinh.f64 x) x)
cost-diff0
(log.f64 (/.f64 (sinh.f64 x) x))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
0412
0412
0412
Stop Event
saturated
saturated
saturated
Calls
Call 1
Inputs
(log.f64 (/.f64 (sinh.f64 x) x))
(/.f64 (sinh.f64 x) x)
(sinh.f64 x)
x
Outputs
(log.f64 (/.f64 (sinh.f64 x) x))
(/.f64 (sinh.f64 x) x)
(sinh.f64 x)
x

localize87.0ms (1%)

Memory
-19.6MiB live, 79.4MiB allocated; 13ms collecting garbage
Localize:

Found 3 expressions of interest:

NewMetricScoreProgram
accuracy0.01171875
(/.f64 (sinh.f64 x) x)
accuracy0.01171875
(sinh.f64 x)
accuracy29.622062695783086
(log.f64 (/.f64 (sinh.f64 x) x))
Samples
69.0ms169×2valid
10.0ms75×1valid
1.0ms12×0valid
Compiler

Compiled 14 to 6 computations (57.1% saved)

Precisions
Click to see histograms. Total time spent on operations: 69.0ms
ival-log: 36.0ms (52.3% of total)
ival-sinh: 22.0ms (31.9% of total)
adjust: 5.0ms (7.3% of total)
ival-div: 5.0ms (7.3% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)

series68.0ms (0.8%)

Memory
-6.3MiB live, 81.7MiB allocated; 17ms collecting garbage
Counts
3 → 16
Calls
Call 1
Inputs
(log.f64 (/.f64 (sinh.f64 x) x))
(/.f64 (sinh.f64 x) x)
(sinh.f64 x)
Outputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -1/180 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* 1/2835 (pow x 2)) 1/180))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/2835 (* -1/37800 (pow x 2)))) 1/180))))
1
(+ 1 (* 1/6 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2)))))))
x
(* x (+ 1 (* 1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2))))))
(* x (+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2))))))))
(+ (log (* 1/2 (- (exp x) (/ 1 (exp x))))) (log (/ 1 x)))
(* 1/2 (/ (- (exp x) (/ 1 (exp x))) x))
(* 1/2 (- (exp x) (/ 1 (exp x))))
(+ (log (* -1/2 (- (exp x) (/ 1 (exp x))))) (log (/ -1 x)))
Calls

3 calls:

TimeVariablePointExpression
33.0ms
x
@inf
((log (/ (sinh x) x)) (/ (sinh x) x) (sinh x))
33.0ms
x
@-inf
((log (/ (sinh x) x)) (/ (sinh x) x) (sinh x))
2.0ms
x
@0
((log (/ (sinh x) x)) (/ (sinh x) x) (sinh x))

simplify61.0ms (0.7%)

Memory
-0.4MiB live, 44.2MiB allocated; 6ms collecting garbage
Iterations

Useful iterations: 3 (0.0ms)

IterNodesCost
059187
1186187
2561181
32412173
46368173
08382173
Stop Event
saturated
node limit
Counts
16 → 1
Calls
Call 1
Inputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -1/180 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* 1/2835 (pow x 2)) 1/180))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/2835 (* -1/37800 (pow x 2)))) 1/180))))
1
(+ 1 (* 1/6 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2)))))))
x
(* x (+ 1 (* 1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2))))))
(* x (+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2))))))))
(+ (log (* 1/2 (- (exp x) (/ 1 (exp x))))) (log (/ 1 x)))
(* 1/2 (/ (- (exp x) (/ 1 (exp x))) x))
(* 1/2 (- (exp x) (/ 1 (exp x))))
(+ (log (* -1/2 (- (exp x) (/ 1 (exp x))))) (log (/ -1 x)))
Outputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -1/180 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* 1/2835 (pow x 2)) 1/180))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/2835 (* -1/37800 (pow x 2)))) 1/180))))
1
#s(literal 1 binary64)
(+ 1 (* 1/6 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2)))))))
x
(* x (+ 1 (* 1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2))))))
(* x (+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2))))))))
(+ (log (* 1/2 (- (exp x) (/ 1 (exp x))))) (log (/ 1 x)))
(* 1/2 (/ (- (exp x) (/ 1 (exp x))) x))
(* 1/2 (- (exp x) (/ 1 (exp x))))
(+ (log (* -1/2 (- (exp x) (/ 1 (exp x))))) (log (/ -1 x)))

rewrite13.0ms (0.2%)

Memory
13.6MiB live, 13.6MiB allocated; 0ms collecting garbage
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
0411
0411
0411
Stop Event
saturated
saturated
saturated
Counts
3 → 3
Calls
Call 1
Inputs
(log.f64 (/.f64 (sinh.f64 x) x))
(/.f64 (sinh.f64 x) x)
(sinh.f64 x)
Outputs
(log.f64 (/.f64 (sinh.f64 x) x))
(/.f64 (sinh.f64 x) x)
(sinh.f64 x)

eval0.0ms (0%)

Memory
0.5MiB live, 0.5MiB allocated; 0ms collecting garbage
Compiler

Compiled 22 to 9 computations (59.1% saved)

prune1.0ms (0%)

Memory
0.9MiB live, 0.9MiB allocated; 0ms collecting garbage
Pruning

2 alts after pruning (1 fresh and 1 done)

PrunedKeptTotal
New314
Fresh000
Picked011
Done000
Total325
Accuracy
53.6%
Counts
5 → 2
Alt Table
Click to see full alt table
StatusAccuracyProgram
53.6%
(log.f64 (/.f64 (sinh.f64 x) x))
49.8%
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Compiler

Compiled 12 to 10 computations (16.7% saved)

simplify99.0ms (1.2%)

Memory
-9.5MiB live, 37.5MiB allocated; 21ms collecting garbage
Localize:

Found 2 expressions of interest:

NewMetricScoreProgram
cost-diff0
#s(approx (/ (sinh x) x) #s(literal 1 binary64))
cost-diff0
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
0614
0614
11414
23014
37914
438814
5285714
6799914
0801314
Stop Event
saturated
node limit
saturated
Calls
Call 1
Inputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
#s(approx (/ (sinh x) x) #s(literal 1 binary64))
#s(literal 1 binary64)
Outputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
#s(approx (/ (sinh x) x) #s(literal 1 binary64))
#s(literal 1 binary64)

localize80.0ms (1%)

Memory
12.7MiB live, 59.1MiB allocated; 4ms collecting garbage
Localize:

Found 2 expressions of interest:

NewMetricScoreProgram
accuracy2.7684509899452427
#s(approx (/ (sinh x) x) #s(literal 1 binary64))
accuracy29.622062695783086
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Samples
62.0ms169×2valid
10.0ms75×1valid
1.0ms12×0valid
Compiler

Compiled 12 to 7 computations (41.7% saved)

Precisions
Click to see histograms. Total time spent on operations: 63.0ms
ival-log: 33.0ms (52.7% of total)
ival-sinh: 19.0ms (30.3% of total)
adjust: 5.0ms (8% of total)
ival-div: 5.0ms (8% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)

series17.0ms (0.2%)

Memory
-24.3MiB live, 20.5MiB allocated; 5ms collecting garbage
Counts
2 → 11
Calls
Call 1
Inputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
#s(approx (/ (sinh x) x) #s(literal 1 binary64))
Outputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -1/180 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* 1/2835 (pow x 2)) 1/180))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/2835 (* -1/37800 (pow x 2)))) 1/180))))
1
(+ 1 (* 1/6 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2)))))))
(+ (log (* 1/2 (- (exp x) (/ 1 (exp x))))) (log (/ 1 x)))
(* 1/2 (/ (- (exp x) (/ 1 (exp x))) x))
(+ (log (* -1/2 (- (exp x) (/ 1 (exp x))))) (log (/ -1 x)))
Calls

3 calls:

TimeVariablePointExpression
9.0ms
x
@-inf
((log (/ (sinh x) x)) (/ (sinh x) x))
7.0ms
x
@inf
((log (/ (sinh x) x)) (/ (sinh x) x))
1.0ms
x
@0
((log (/ (sinh x) x)) (/ (sinh x) x))

simplify49.0ms (0.6%)

Memory
37.2MiB live, 37.2MiB allocated; 0ms collecting garbage
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
056133
1166133
2468133
31755133
45528133
08833133
Stop Event
saturated
node limit
Counts
11 → 1
Calls
Call 1
Inputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -1/180 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* 1/2835 (pow x 2)) 1/180))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/2835 (* -1/37800 (pow x 2)))) 1/180))))
1
(+ 1 (* 1/6 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2)))))))
(+ (log (* 1/2 (- (exp x) (/ 1 (exp x))))) (log (/ 1 x)))
(* 1/2 (/ (- (exp x) (/ 1 (exp x))) x))
(+ (log (* -1/2 (- (exp x) (/ 1 (exp x))))) (log (/ -1 x)))
Outputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -1/180 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* 1/2835 (pow x 2)) 1/180))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/2835 (* -1/37800 (pow x 2)))) 1/180))))
1
#s(literal 1 binary64)
(+ 1 (* 1/6 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/6 (* 1/120 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/6 (* (pow x 2) (+ 1/120 (* 1/5040 (pow x 2)))))))
(+ (log (* 1/2 (- (exp x) (/ 1 (exp x))))) (log (/ 1 x)))
(* 1/2 (/ (- (exp x) (/ 1 (exp x))) x))
(+ (log (* -1/2 (- (exp x) (/ 1 (exp x))))) (log (/ -1 x)))

rewrite55.0ms (0.7%)

Memory
-15.6MiB live, 30.3MiB allocated; 3ms collecting garbage
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
0613
0613
11713
26113
038813
Stop Event
saturated
iter limit
iter limit
unsound
saturated
Counts
2 → 2
Calls
Call 1
Inputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
#s(approx (/ (sinh x) x) #s(literal 1 binary64))
Outputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
#s(approx (/ (sinh x) x) #s(literal 1 binary64))

eval0.0ms (0%)

Memory
0.3MiB live, 0.3MiB allocated; 0ms collecting garbage
Compiler

Compiled 14 to 6 computations (57.1% saved)

prune1.0ms (0%)

Memory
1.5MiB live, 1.5MiB allocated; 0ms collecting garbage
Pruning

2 alts after pruning (0 fresh and 2 done)

PrunedKeptTotal
New202
Fresh000
Picked011
Done011
Total224
Accuracy
53.6%
Counts
4 → 2
Alt Table
Click to see full alt table
StatusAccuracyProgram
53.6%
(log.f64 (/.f64 (sinh.f64 x) x))
49.8%
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Compiler

Compiled 24 to 19 computations (20.8% saved)

regimes3.0ms (0%)

Memory
5.6MiB live, 5.6MiB allocated; 0ms collecting garbage
Counts
2 → 1
Calls
Call 1
Inputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
(log.f64 (/.f64 (sinh.f64 x) x))
Outputs
(log.f64 (/.f64 (sinh.f64 x) x))
Calls

3 calls:

1.0ms
x
1.0ms
(log.f64 (/.f64 (sinh.f64 x) x))
1.0ms
(/.f64 (sinh.f64 x) x)
Results
AccuracySegmentsBranch
53.6%1(/.f64 (sinh.f64 x) x)
53.6%1(log.f64 (/.f64 (sinh.f64 x) x))
53.6%1x
Compiler

Compiled 10 to 8 computations (20% saved)

regimes3.0ms (0%)

Memory
5.2MiB live, 5.2MiB allocated; 0ms collecting garbage
Accuracy

Total 0.0b remaining (0%)

Threshold costs 0b (0%)

Counts
1 → 1
Calls
Call 1
Inputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Outputs
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Calls

3 calls:

1.0ms
x
1.0ms
(log.f64 (/.f64 (sinh.f64 x) x))
1.0ms
(/.f64 (sinh.f64 x) x)
Results
AccuracySegmentsBranch
49.8%1(/.f64 (sinh.f64 x) x)
49.8%1(log.f64 (/.f64 (sinh.f64 x) x))
49.8%1x
Compiler

Compiled 10 to 8 computations (20% saved)

simplify91.0ms (1.1%)

Memory
-58.4MiB live, 28.0MiB allocated; 98ms collecting garbage
Iterations

Useful iterations: 0 (0.0ms)

IterNodesCost
0912
11712
23312
38712
440512
5312312
Stop Event
node limit
Calls
Call 1
Inputs
(log.f64 (/.f64 (sinh.f64 x) x))
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))
Outputs
(log.f64 (/.f64 (sinh.f64 x) x))
(log.f64 #s(approx (/ (sinh x) x) #s(literal 1 binary64)))

derivations16.0ms (0.2%)

Memory
20.8MiB live, 20.8MiB allocated; 0ms collecting garbage
Stop Event
done
Compiler

Compiled 12 to 9 computations (25% saved)

preprocess28.0ms (0.3%)

Memory
-15.2MiB live, 31.2MiB allocated; 11ms collecting garbage
Remove

(abs x)

Compiler

Compiled 114 to 76 computations (33.3% saved)

end0.0ms (0%)

Memory
0.0MiB live, 0.0MiB allocated; 0ms collecting garbage

Profiling

Loading profile data...