ENA, Section 1.4, Exercise 4a

Time bar (total: 3.3s)

start0.0ms (0%)

Memory
0.1MiB live, 0.1MiB allocated

analyze2.0ms (0.1%)

Memory
2.7MiB live, 2.7MiB allocated
Algorithm
search
Search
ProbabilityValidUnknownPreconditionInfiniteDomainCan'tIter
0%0%50%50%0%0%0%0
0%0%50%50%0%0%0%1
50%25%25%50%0%0%0%2
75%37.5%12.5%50%0%0%0%3
87.5%43.7%6.2%50%0%0%0%4
93.8%46.8%3.1%50%0%0%0%5
96.9%48.4%1.6%50%0%0%0%6
98.4%49.2%0.8%50%0%0%0%7
99.2%49.6%0.4%50%0%0%0%8
99.6%49.8%0.2%50%0%0%0%9
99.8%49.9%0.1%50%0%0%0%10
99.9%49.9%0%50%0%0%0%11
100%49.9%0%50%0%0%0%12
Compiler

Compiled 15 to 11 computations (26.7% saved)

sample2.9s (88.6%)

Memory
18.6MiB live, 3 477.4MiB allocated
Samples
2.2s5 677×2valid
331.0ms2 423×1valid
10.0ms156×0valid
Precisions
Click to see histograms. Total time spent on operations: 2.3s
ival-sin: 1.6s (70.3% of total)
adjust: 242.0ms (10.5% of total)
ival-div: 184.0ms (8% of total)
ival-sub: 133.0ms (5.8% of total)
ival-tan: 51.0ms (2.2% of total)
ival-<=: 49.0ms (2.1% of total)
ival-and: 12.0ms (0.5% of total)
exact: 11.0ms (0.5% of total)
ival-assert: 3.0ms (0.1% of total)
Bogosity

explain169.0ms (5.1%)

Memory
-15.2MiB live, 220.8MiB allocated
FPErrors
Click to see full error table
Ground TruthOverpredictionsExampleUnderpredictionsExampleSubexpression
890-1(0.2608551158286883)(-.f64 x (sin.f64 x))
510-3(-1.2842219873614268e-107)(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
00-0-(tan.f64 x)
00-0-(sin.f64 x)
00-0-x
Explanations
Click to see full explanations table
OperatorSubexpressionExplanationCount
-.f64(-.f64 x (sin.f64 x))cancellation881
/.f64(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))u/n480
(-.f64 x (sin.f64 x))underflow167
Confusion
Predicted +Predicted -
+1361
-0119
Precision
1.0
Recall
0.9927007299270073
Confusion?
Predicted +Predicted MaybePredicted -
+13610
-00119
Precision?
1.0
Recall?
1.0
Freqs
test
numberfreq
0120
1136
Total Confusion?
Predicted +Predicted MaybePredicted -
+100
-000
Precision?
1.0
Recall?
1.0
Samples
106.0ms342×2valid
19.0ms158×1valid
1.0ms12×0valid
Compiler

Compiled 59 to 24 computations (59.3% saved)

Precisions
Click to see histograms. Total time spent on operations: 102.0ms
ival-sin: 70.0ms (68.4% of total)
adjust: 12.0ms (11.7% of total)
ival-div: 9.0ms (8.8% of total)
ival-sub: 7.0ms (6.8% of total)
ival-tan: 4.0ms (3.9% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)

preprocess2.0ms (0.1%)

Memory
4.6MiB live, 4.6MiB allocated
Algorithm
egg-herbie
Calls
Call 1
Inputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Outputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Compiler

Compiled 7 to 5 computations (28.6% saved)

eval0.0ms (0%)

Memory
0.1MiB live, 0.1MiB allocated
Compiler

Compiled 0 to 1 computations (-∞% saved)

prune0.0ms (0%)

Memory
0.8MiB live, 0.7MiB allocated
Alt Table
Click to see full alt table
StatusAccuracyProgram
51.8%
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Compiler

Compiled 7 to 5 computations (28.6% saved)

simplify0.0ms (0%)

Memory
0.5MiB live, 0.5MiB allocated
Algorithm
egg-herbie
Localize:

Found 4 expressions of interest:

NewMetricScoreProgram
cost-diff0
(tan.f64 x)
cost-diff0
(sin.f64 x)
cost-diff0
(-.f64 x (sin.f64 x))
cost-diff0
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Calls
Call 1
Inputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
(-.f64 x (sin.f64 x))
x
(sin.f64 x)
(tan.f64 x)
Outputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
(-.f64 x (sin.f64 x))
x
(sin.f64 x)
(tan.f64 x)

localize70.0ms (2.1%)

Memory
6.8MiB live, 85.4MiB allocated
Localize:

Found 4 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(tan.f64 x)
accuracy0.0
(sin.f64 x)
accuracy11.175144327332701
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
accuracy19.45837959211947
(-.f64 x (sin.f64 x))
Samples
51.0ms171×2valid
11.0ms79×1valid
0.0ms0valid
Compiler

Compiled 34 to 12 computations (64.7% saved)

Precisions
Click to see histograms. Total time spent on operations: 51.0ms
ival-sin: 35.0ms (68.9% of total)
adjust: 6.0ms (11.8% of total)
ival-div: 4.0ms (7.9% of total)
ival-sub: 4.0ms (7.9% of total)
ival-tan: 2.0ms (3.9% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)

series4.0ms (0.1%)

Memory
5.6MiB live, 5.6MiB allocated
Counts
4 → 22
Calls
Call 1
Inputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
(-.f64 x (sin.f64 x))
(sin.f64 x)
(tan.f64 x)
Outputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -23/360 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* -11/15120 (pow x 2)) 23/360))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (- (* -143/604800 (pow x 2)) 11/15120)) 23/360))))
(* 1/6 (pow x 3))
(* (pow x 3) (+ 1/6 (* -1/120 (pow x 2))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* 1/5040 (pow x 2)) 1/120))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/5040 (* -1/362880 (pow x 2)))) 1/120))))
x
(* x (+ 1 (* -1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (- (* 1/120 (pow x 2)) 1/6))))
(* x (+ 1 (* (pow x 2) (- (* (pow x 2) (+ 1/120 (* -1/5040 (pow x 2)))) 1/6))))
(* x (+ 1 (* 1/3 (pow x 2))))
(* x (+ 1 (* (pow x 2) (+ 1/3 (* 2/15 (pow x 2))))))
(* x (+ 1 (* (pow x 2) (+ 1/3 (* (pow x 2) (+ 2/15 (* 17/315 (pow x 2))))))))
(/ (* x (cos x)) (sin x))
(* x (+ (* -1 (/ (cos x) x)) (/ (cos x) (sin x))))
(* x (+ 1 (* -1 (/ (sin x) x))))
(sin x)
(/ (sin x) (cos x))
(* -1 (* x (+ (* -1 (/ (cos x) (sin x))) (/ (cos x) x))))
(* -1 (* x (- (/ (sin x) x) 1)))
Calls

3 calls:

TimeVariablePointExpression
1.0ms
x
@-inf
((/ (- x (sin x)) (tan x)) (- x (sin x)) (sin x) (tan x))
1.0ms
x
@inf
((/ (- x (sin x)) (tan x)) (- x (sin x)) (sin x) (tan x))
1.0ms
x
@0
((/ (- x (sin x)) (tan x)) (- x (sin x)) (sin x) (tan x))

simplify1.0ms (0%)

Memory
0.9MiB live, 0.9MiB allocated
Algorithm
egg-herbie
Counts
22 → 4
Calls
Call 1
Inputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -23/360 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* -11/15120 (pow x 2)) 23/360))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (- (* -143/604800 (pow x 2)) 11/15120)) 23/360))))
(* 1/6 (pow x 3))
(* (pow x 3) (+ 1/6 (* -1/120 (pow x 2))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* 1/5040 (pow x 2)) 1/120))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/5040 (* -1/362880 (pow x 2)))) 1/120))))
x
(* x (+ 1 (* -1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (- (* 1/120 (pow x 2)) 1/6))))
(* x (+ 1 (* (pow x 2) (- (* (pow x 2) (+ 1/120 (* -1/5040 (pow x 2)))) 1/6))))
(* x (+ 1 (* 1/3 (pow x 2))))
(* x (+ 1 (* (pow x 2) (+ 1/3 (* 2/15 (pow x 2))))))
(* x (+ 1 (* (pow x 2) (+ 1/3 (* (pow x 2) (+ 2/15 (* 17/315 (pow x 2))))))))
(/ (* x (cos x)) (sin x))
(* x (+ (* -1 (/ (cos x) x)) (/ (cos x) (sin x))))
(* x (+ 1 (* -1 (/ (sin x) x))))
(sin x)
(/ (sin x) (cos x))
(* -1 (* x (+ (* -1 (/ (cos x) (sin x))) (/ (cos x) x))))
(* -1 (* x (- (/ (sin x) x) 1)))
Outputs
(* 1/6 (pow x 2))
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
(* (pow x 2) (+ 1/6 (* -23/360 (pow x 2))))
(-.f64 x (sin.f64 x))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* -11/15120 (pow x 2)) 23/360))))
(sin.f64 x)
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (- (* -143/604800 (pow x 2)) 11/15120)) 23/360))))
(tan.f64 x)

rewrite0.0ms (0%)

Memory
0.6MiB live, 0.6MiB allocated
Counts
4 → 4
Calls
Call 1
Inputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
(-.f64 x (sin.f64 x))
(sin.f64 x)
(tan.f64 x)
Outputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
(-.f64 x (sin.f64 x))
(sin.f64 x)
(tan.f64 x)

eval1.0ms (0%)

Memory
1.5MiB live, 1.6MiB allocated
Compiler

Compiled 75 to 13 computations (82.7% saved)

prune1.0ms (0%)

Memory
2.5MiB live, 2.4MiB allocated
Pruning

3 alts after pruning (2 fresh and 1 done)

PrunedKeptTotal
New628
Fresh000
Picked011
Done000
Total639
Accuracy
52.2%
Counts
9 → 3
Alt Table
Click to see full alt table
StatusAccuracyProgram
51.8%
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
50.0%
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
5.9%
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Compiler

Compiled 29 to 20 computations (31% saved)

simplify0.0ms (0%)

Memory
0.7MiB live, 0.7MiB allocated
Algorithm
egg-herbie
Localize:

Found 5 expressions of interest:

NewMetricScoreProgram
cost-diff0
(sin.f64 x)
cost-diff0
(-.f64 x (sin.f64 x))
cost-diff0
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
cost-diff0
(sin.f64 x)
cost-diff0
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Calls
Call 1
Inputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
(sin.f64 x)
x
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(-.f64 x (sin.f64 x))
x
(sin.f64 x)
Outputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
(sin.f64 x)
x
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(-.f64 x (sin.f64 x))
x
(sin.f64 x)

localize71.0ms (2.1%)

Memory
-18.9MiB live, 96.4MiB allocated
Localize:

Found 5 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(sin.f64 x)
accuracy19.45837959211947
(-.f64 x (sin.f64 x))
accuracy31.854903578181432
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
accuracy0.0
(sin.f64 x)
accuracy60.24930137704496
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Samples
52.0ms171×2valid
10.0ms79×1valid
0.0ms0valid
Compiler

Compiled 58 to 16 computations (72.4% saved)

Precisions
Click to see histograms. Total time spent on operations: 50.0ms
ival-sin: 33.0ms (66.4% of total)
adjust: 6.0ms (12.1% of total)
ival-div: 4.0ms (8% of total)
ival-sub: 4.0ms (8% of total)
ival-tan: 2.0ms (4% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)

series1.0ms (0%)

Memory
2.4MiB live, 2.4MiB allocated
Counts
4 → 18
Calls
Call 1
Inputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
(sin.f64 x)
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(-.f64 x (sin.f64 x))
Outputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -23/360 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* -11/15120 (pow x 2)) 23/360))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (- (* -143/604800 (pow x 2)) 11/15120)) 23/360))))
x
(* x (+ 1 (* -1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (- (* 1/120 (pow x 2)) 1/6))))
(* x (+ 1 (* (pow x 2) (- (* (pow x 2) (+ 1/120 (* -1/5040 (pow x 2)))) 1/6))))
(* 1/6 (pow x 3))
(* (pow x 3) (+ 1/6 (* -1/120 (pow x 2))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* 1/5040 (pow x 2)) 1/120))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/5040 (* -1/362880 (pow x 2)))) 1/120))))
(/ (* x (cos x)) (sin x))
(* x (+ (* -1 (/ (cos x) x)) (/ (cos x) (sin x))))
(sin x)
(* x (+ 1 (* -1 (/ (sin x) x))))
(* -1 (* x (+ (* -1 (/ (cos x) (sin x))) (/ (cos x) x))))
(* -1 (* x (- (/ (sin x) x) 1)))
Calls

3 calls:

TimeVariablePointExpression
0.0ms
x
@-inf
((/ (- x (sin x)) (tan x)) (sin x) (/ (- x (sin x)) (tan x)) (- x (sin x)))
0.0ms
x
@inf
((/ (- x (sin x)) (tan x)) (sin x) (/ (- x (sin x)) (tan x)) (- x (sin x)))
0.0ms
x
@0
((/ (- x (sin x)) (tan x)) (sin x) (/ (- x (sin x)) (tan x)) (- x (sin x)))

simplify0.0ms (0%)

Memory
0.7MiB live, 0.7MiB allocated
Algorithm
egg-herbie
Counts
18 → 4
Calls
Call 1
Inputs
(* 1/6 (pow x 2))
(* (pow x 2) (+ 1/6 (* -23/360 (pow x 2))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* -11/15120 (pow x 2)) 23/360))))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (- (* -143/604800 (pow x 2)) 11/15120)) 23/360))))
x
(* x (+ 1 (* -1/6 (pow x 2))))
(* x (+ 1 (* (pow x 2) (- (* 1/120 (pow x 2)) 1/6))))
(* x (+ 1 (* (pow x 2) (- (* (pow x 2) (+ 1/120 (* -1/5040 (pow x 2)))) 1/6))))
(* 1/6 (pow x 3))
(* (pow x 3) (+ 1/6 (* -1/120 (pow x 2))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* 1/5040 (pow x 2)) 1/120))))
(* (pow x 3) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (+ 1/5040 (* -1/362880 (pow x 2)))) 1/120))))
(/ (* x (cos x)) (sin x))
(* x (+ (* -1 (/ (cos x) x)) (/ (cos x) (sin x))))
(sin x)
(* x (+ 1 (* -1 (/ (sin x) x))))
(* -1 (* x (+ (* -1 (/ (cos x) (sin x))) (/ (cos x) x))))
(* -1 (* x (- (/ (sin x) x) 1)))
Outputs
(* 1/6 (pow x 2))
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
(* (pow x 2) (+ 1/6 (* -23/360 (pow x 2))))
(sin.f64 x)
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* -11/15120 (pow x 2)) 23/360))))
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(* (pow x 2) (+ 1/6 (* (pow x 2) (- (* (pow x 2) (- (* -143/604800 (pow x 2)) 11/15120)) 23/360))))
(-.f64 x (sin.f64 x))

rewrite0.0ms (0%)

Memory
0.6MiB live, 0.6MiB allocated
Counts
4 → 4
Calls
Call 1
Inputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
(sin.f64 x)
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(-.f64 x (sin.f64 x))
Outputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
(sin.f64 x)
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(-.f64 x (sin.f64 x))

eval1.0ms (0%)

Memory
1.3MiB live, 1.3MiB allocated
Compiler

Compiled 94 to 11 computations (88.3% saved)

prune2.0ms (0.1%)

Memory
4.4MiB live, 4.4MiB allocated
Pruning

3 alts after pruning (0 fresh and 3 done)

PrunedKeptTotal
New707
Fresh000
Picked022
Done011
Total7310
Accuracy
52.2%
Counts
10 → 3
Alt Table
Click to see full alt table
StatusAccuracyProgram
51.8%
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
50.0%
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
5.9%
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Compiler

Compiled 58 to 31 computations (46.6% saved)

regimes3.0ms (0.1%)

Memory
6.9MiB live, 6.9MiB allocated
Counts
3 → 1
Calls
Call 1
Inputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Outputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Calls

2 calls:

2.0ms
x
1.0ms
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Results
AccuracySegmentsBranch
51.8%1x
51.8%1(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Compiler

Compiled 8 to 6 computations (25% saved)

regimes3.0ms (0.1%)

Memory
6.0MiB live, 6.0MiB allocated
Counts
2 → 1
Calls
Call 1
Inputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
Outputs
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
Calls

2 calls:

1.0ms
x
1.0ms
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Results
AccuracySegmentsBranch
50.0%1x
50.0%1(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Compiler

Compiled 8 to 6 computations (25% saved)

regimes2.0ms (0.1%)

Memory
4.9MiB live, 4.9MiB allocated
Accuracy

Total 0.0b remaining (0%)

Threshold costs 0b (0%)

Counts
1 → 1
Calls
Call 1
Inputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Outputs
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Calls

2 calls:

1.0ms
x
1.0ms
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Results
AccuracySegmentsBranch
5.9%1x
5.9%1(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
Compiler

Compiled 8 to 6 computations (25% saved)

simplify12.0ms (0.4%)

Memory
-28.5MiB live, 15.4MiB allocated
Algorithm
egg-herbie
Calls
Call 1
Inputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))
Outputs
(/.f64 (-.f64 x (sin.f64 x)) (tan.f64 x))
#s(approx (/ (- x (sin x)) (tan x)) (-.f64 x (sin.f64 x)))
#s(approx (/ (- x (sin x)) (tan x)) (sin.f64 x))

soundness1.0ms (0%)

Memory
1.3MiB live, 1.3MiB allocated
Stop Event
done
Compiler

Compiled 29 to 11 computations (62.1% saved)

preprocess30.0ms (0.9%)

Memory
28.6MiB live, 65.4MiB allocated
Compiler

Compiled 82 to 40 computations (51.2% saved)

end0.0ms (0%)

Memory
0.0MiB live, 0.0MiB allocated

Profiling

Loading profile data...