Migdal et al, Equation (64)

Time bar (total: 1.6s)

start0.0ms (0%)

Memory
0.1MiB live, 0.1MiB allocated

analyze0.0ms (0%)

Memory
0.8MiB live, 0.8MiB allocated
Algorithm
search
Search
ProbabilityValidUnknownPreconditionInfiniteDomainCan'tIter
0%0%99.9%0.1%0%0%0%0
100%99.9%0%0.1%0%0%0%1
Compiler

Compiled 21 to 14 computations (33.3% saved)

sample1.1s (68.3%)

Memory
15.1MiB live, 1 481.1MiB allocated
Samples
777.0ms8 256×0valid
Precisions
Click to see histograms. Total time spent on operations: 557.0ms
ival-cos: 199.0ms (35.7% of total)
ival-mult: 194.0ms (34.8% of total)
ival-sqrt: 58.0ms (10.4% of total)
ival-div: 53.0ms (9.5% of total)
ival-add: 38.0ms (6.8% of total)
ival-true: 6.0ms (1.1% of total)
exact: 6.0ms (1.1% of total)
ival-assert: 4.0ms (0.7% of total)
Bogosity

explain137.0ms (8.6%)

Memory
-3.1MiB live, 194.3MiB allocated
FPErrors
Click to see full error table
Ground TruthOverpredictionsExampleUnderpredictionsExampleSubexpression
00-0-a1
00-0-(*.f64 a1 a1)
00-0-(sqrt.f64 #s(literal 2 binary64))
00-0-th
00-0-#s(literal 2 binary64)
00-0-(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
00-0-(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
00-0-(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
00-0-(*.f64 a2 a2)
00-0-(cos.f64 th)
00-0-(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
00-0-a2
Confusion
Predicted +Predicted -
+00
-0256
Precision
0/0
Recall
0/0
Confusion?
Predicted +Predicted MaybePredicted -
+000
-00256
Precision?
0/0
Recall?
0/0
Freqs
test
numberfreq
0256
Total Confusion?
Predicted +Predicted MaybePredicted -
+000
-001
Precision?
0/0
Recall?
0/0
Samples
60.0ms512×0valid
Compiler

Compiled 191 to 52 computations (72.8% saved)

Precisions
Click to see histograms. Total time spent on operations: 41.0ms
ival-cos: 15.0ms (36.8% of total)
ival-mult: 14.0ms (34.3% of total)
ival-div: 4.0ms (9.8% of total)
ival-sqrt: 4.0ms (9.8% of total)
ival-add: 2.0ms (4.9% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)
ival-assert: 0.0ms (0% of total)

preprocess3.0ms (0.2%)

Memory
6.5MiB live, 6.5MiB allocated
Algorithm
egg-herbie
Calls
Call 1
Inputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Outputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Compiler

Compiled 19 to 12 computations (36.8% saved)

eval0.0ms (0%)

Memory
0.1MiB live, 0.1MiB allocated
Compiler

Compiled 0 to 3 computations (-∞% saved)

prune0.0ms (0%)

Memory
0.9MiB live, 0.9MiB allocated
Alt Table
Click to see full alt table
StatusAccuracyProgram
99.6%
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Compiler

Compiled 19 to 12 computations (36.8% saved)

simplify0.0ms (0%)

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

Found 4 expressions of interest:

NewMetricScoreProgram
cost-diff0
(cos.f64 th)
cost-diff0
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
cost-diff0
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
cost-diff0
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Calls
Call 1
Inputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
(*.f64 a1 a1)
a1
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
(*.f64 a2 a2)
a2
Outputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
(*.f64 a1 a1)
a1
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
(*.f64 a2 a2)
a2

localize35.0ms (2.2%)

Memory
5.7MiB live, 43.3MiB allocated
Localize:

Found 4 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(cos.f64 th)
accuracy0.18425751953688405
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
accuracy0.193691259768442
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
accuracy0.721035009768442
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
Samples
27.0ms256×0valid
Compiler

Compiled 114 to 26 computations (77.2% saved)

Precisions
Click to see histograms. Total time spent on operations: 16.0ms
ival-cos: 6.0ms (37% of total)
ival-mult: 6.0ms (37% of total)
ival-div: 2.0ms (12.3% of total)
ival-sqrt: 2.0ms (12.3% of total)
ival-add: 1.0ms (6.2% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)
ival-assert: 0.0ms (0% of total)

series19.0ms (1.2%)

Memory
-15.8MiB live, 25.9MiB allocated
Counts
5 → 27
Calls
Call 1
Inputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(/ (pow a1 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a1 2) (sqrt 2))))))) (/ (pow a1 2) (sqrt 2)))
(/ 1 (sqrt 2))
(+ (* -1/2 (/ (pow th 2) (sqrt 2))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* 1/24 (/ (pow th 2) (sqrt 2))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* (pow th 2) (+ (* -1/720 (/ (pow th 2) (sqrt 2))) (* 1/24 (/ 1 (sqrt 2))))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
1
(+ 1 (* -1/2 (pow th 2)))
(+ 1 (* (pow th 2) (- (* 1/24 (pow th 2)) 1/2)))
(+ 1 (* (pow th 2) (- (* (pow th 2) (+ 1/24 (* -1/720 (pow th 2)))) 1/2)))
(/ (pow a2 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* 1/24 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2))))))) (/ (pow a2 2) (sqrt 2)))
(/ (cos th) (sqrt 2))
(cos th)
Calls

9 calls:

TimeVariablePointExpression
4.0ms
th
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (cos th) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
3.0ms
th
@-inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (cos th) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
2.0ms
a1
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (cos th) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
2.0ms
th
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (cos th) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
1.0ms
a2
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (cos th) (* (/ (cos th) (sqrt 2)) (* a2 a2)))

simplify1.0ms (0%)

Memory
1.1MiB live, 1.1MiB allocated
Algorithm
egg-herbie
Counts
27 → 5
Calls
Call 1
Inputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(/ (pow a1 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a1 2) (sqrt 2))))))) (/ (pow a1 2) (sqrt 2)))
(/ 1 (sqrt 2))
(+ (* -1/2 (/ (pow th 2) (sqrt 2))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* 1/24 (/ (pow th 2) (sqrt 2))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* (pow th 2) (+ (* -1/720 (/ (pow th 2) (sqrt 2))) (* 1/24 (/ 1 (sqrt 2))))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
1
(+ 1 (* -1/2 (pow th 2)))
(+ 1 (* (pow th 2) (- (* 1/24 (pow th 2)) 1/2)))
(+ 1 (* (pow th 2) (- (* (pow th 2) (+ 1/24 (* -1/720 (pow th 2)))) 1/2)))
(/ (pow a2 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* 1/24 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2))))))) (/ (pow a2 2) (sqrt 2)))
(/ (cos th) (sqrt 2))
(cos th)
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(cos.f64 th)
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))

rewrite0.0ms (0%)

Memory
0.7MiB live, 0.7MiB allocated
Counts
5 → 5
Calls
Call 1
Inputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
Outputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))

eval1.0ms (0.1%)

Memory
2.5MiB live, 2.5MiB allocated
Compiler

Compiled 277 to 27 computations (90.3% saved)

prune2.0ms (0.1%)

Memory
3.6MiB live, 3.6MiB allocated
Pruning

4 alts after pruning (3 fresh and 1 done)

PrunedKeptTotal
New9312
Fresh000
Picked011
Done000
Total9413
Accuracy
99.6%
Counts
13 → 4
Alt Table
Click to see full alt table
StatusAccuracyProgram
99.6%
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
59.4%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
56.7%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Compiler

Compiled 99 to 64 computations (35.4% saved)

simplify1.0ms (0%)

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

Found 10 expressions of interest:

NewMetricScoreProgram
cost-diff0
(cos.f64 th)
cost-diff0
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
cost-diff0
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
cost-diff0
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
cost-diff0
(cos.f64 th)
cost-diff0
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
cost-diff0
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
cost-diff0
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
cost-diff0
(cos.f64 th)
cost-diff0
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
(cos.f64 th)
th
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
(*.f64 a1 a1)
a1
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
(*.f64 a2 a2)
a2
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
(cos.f64 th)
th
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
(*.f64 a1 a1)
a1
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
(*.f64 a2 a2)
a2

localize40.0ms (2.5%)

Memory
21.7MiB live, 59.7MiB allocated
Localize:

Found 10 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(cos.f64 th)
accuracy0.18425751953688405
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
accuracy0.721035009768442
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
accuracy25.835701821380873
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
accuracy0.0
(cos.f64 th)
accuracy0.193691259768442
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
accuracy0.721035009768442
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
accuracy27.552911669017185
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
accuracy0.0
(cos.f64 th)
accuracy61.399890547143755
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Samples
30.0ms256×0valid
Compiler

Compiled 241 to 37 computations (84.6% saved)

Precisions
Click to see histograms. Total time spent on operations: 17.0ms
ival-cos: 6.0ms (35.5% of total)
ival-mult: 6.0ms (35.5% of total)
ival-div: 2.0ms (11.8% of total)
ival-sqrt: 2.0ms (11.8% of total)
ival-add: 1.0ms (5.9% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)
ival-assert: 0.0ms (0% of total)

series12.0ms (0.7%)

Memory
-21.1MiB live, 17.0MiB allocated
Counts
7 → 27
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
(cos.f64 th)
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
1
(+ 1 (* -1/2 (pow th 2)))
(+ 1 (* (pow th 2) (- (* 1/24 (pow th 2)) 1/2)))
(+ 1 (* (pow th 2) (- (* (pow th 2) (+ 1/24 (* -1/720 (pow th 2)))) 1/2)))
(/ (pow a1 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a1 2) (sqrt 2))))))) (/ (pow a1 2) (sqrt 2)))
(/ 1 (sqrt 2))
(+ (* -1/2 (/ (pow th 2) (sqrt 2))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* 1/24 (/ (pow th 2) (sqrt 2))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* (pow th 2) (+ (* -1/720 (/ (pow th 2) (sqrt 2))) (* 1/24 (/ 1 (sqrt 2))))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(/ (pow a2 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* 1/24 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2))))))) (/ (pow a2 2) (sqrt 2)))
(cos th)
(/ (cos th) (sqrt 2))
Calls

9 calls:

TimeVariablePointExpression
2.0ms
a1
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos th) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
1.0ms
th
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos th) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
1.0ms
a1
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos th) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
1.0ms
th
@-inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos th) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a2 a2)))
1.0ms
a2
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos th) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a1 a1)) (/ (cos th) (sqrt 2)) (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (* (/ (cos th) (sqrt 2)) (* a2 a2)))

simplify1.0ms (0%)

Memory
0.9MiB live, 0.9MiB allocated
Algorithm
egg-herbie
Counts
27 → 7
Calls
Call 1
Inputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
1
(+ 1 (* -1/2 (pow th 2)))
(+ 1 (* (pow th 2) (- (* 1/24 (pow th 2)) 1/2)))
(+ 1 (* (pow th 2) (- (* (pow th 2) (+ 1/24 (* -1/720 (pow th 2)))) 1/2)))
(/ (pow a1 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))))) (/ (pow a1 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a1 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a1 2) (sqrt 2))))))) (/ (pow a1 2) (sqrt 2)))
(/ 1 (sqrt 2))
(+ (* -1/2 (/ (pow th 2) (sqrt 2))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* 1/24 (/ (pow th 2) (sqrt 2))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* (pow th 2) (+ (* -1/720 (/ (pow th 2) (sqrt 2))) (* 1/24 (/ 1 (sqrt 2))))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(/ (pow a2 2) (sqrt 2))
(+ (* -1/2 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* 1/24 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))))) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (* (pow a2 2) (pow th 2)) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2))))))) (/ (pow a2 2) (sqrt 2)))
(cos th)
(/ (cos th) (sqrt 2))
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(cos.f64 th)
(/ (* (pow a1 2) (cos th)) (sqrt 2))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))

rewrite0.0ms (0%)

Memory
0.8MiB live, 0.8MiB allocated
Counts
7 → 7
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
(cos.f64 th)
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
(cos.f64 th)
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))

eval1.0ms (0.1%)

Memory
2.5MiB live, 2.5MiB allocated
Compiler

Compiled 451 to 28 computations (93.8% saved)

prune4.0ms (0.2%)

Memory
5.9MiB live, 5.9MiB allocated
Pruning

5 alts after pruning (1 fresh and 4 done)

PrunedKeptTotal
New13114
Fresh000
Picked033
Done011
Total13518
Accuracy
99.6%
Counts
18 → 5
Alt Table
Click to see full alt table
StatusAccuracyProgram
99.6%
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
59.4%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
56.7%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Compiler

Compiled 124 to 81 computations (34.7% saved)

simplify0.0ms (0%)

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

Found 4 expressions of interest:

NewMetricScoreProgram
cost-diff0
(sqrt.f64 #s(literal 2 binary64))
cost-diff0
(cos.f64 th)
cost-diff0
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
cost-diff0
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
th
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)

localize32.0ms (2%)

Memory
6.8MiB live, 45.2MiB allocated
Localize:

Found 4 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(sqrt.f64 #s(literal 2 binary64))
accuracy0.0
(cos.f64 th)
accuracy0.721035009768442
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
accuracy61.39741578624005
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
Samples
25.0ms256×0valid
Compiler

Compiled 68 to 31 computations (54.4% saved)

Precisions
Click to see histograms. Total time spent on operations: 16.0ms
ival-cos: 6.0ms (36.9% of total)
ival-mult: 6.0ms (36.9% of total)
ival-div: 2.0ms (12.3% of total)
ival-sqrt: 2.0ms (12.3% of total)
ival-add: 1.0ms (6.1% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)
ival-assert: 0.0ms (0% of total)

series10.0ms (0.6%)

Memory
-29.3MiB live, 13.1MiB allocated
Counts
4 → 19
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
(sqrt.f64 #s(literal 2 binary64))
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(/ 1 (sqrt 2))
(+ (* -1/2 (/ (pow th 2) (sqrt 2))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* 1/24 (/ (pow th 2) (sqrt 2))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* (pow th 2) (+ (* -1/720 (/ (pow th 2) (sqrt 2))) (* 1/24 (/ 1 (sqrt 2))))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
1
(+ 1 (* -1/2 (pow th 2)))
(+ 1 (* (pow th 2) (- (* 1/24 (pow th 2)) 1/2)))
(+ 1 (* (pow th 2) (- (* (pow th 2) (+ 1/24 (* -1/720 (pow th 2)))) 1/2)))
(/ (cos th) (sqrt 2))
(cos th)
Calls

9 calls:

TimeVariablePointExpression
4.0ms
th
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/ (cos th) (sqrt 2)) (cos th) (sqrt 2))
1.0ms
th
@-inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/ (cos th) (sqrt 2)) (cos th) (sqrt 2))
1.0ms
a1
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/ (cos th) (sqrt 2)) (cos th) (sqrt 2))
1.0ms
a1
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/ (cos th) (sqrt 2)) (cos th) (sqrt 2))
1.0ms
a2
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/ (cos th) (sqrt 2)) (cos th) (sqrt 2))

simplify0.0ms (0%)

Memory
0.8MiB live, 0.8MiB allocated
Algorithm
egg-herbie
Counts
19 → 4
Calls
Call 1
Inputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(/ 1 (sqrt 2))
(+ (* -1/2 (/ (pow th 2) (sqrt 2))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* 1/24 (/ (pow th 2) (sqrt 2))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
(+ (* (pow th 2) (- (* (pow th 2) (+ (* -1/720 (/ (pow th 2) (sqrt 2))) (* 1/24 (/ 1 (sqrt 2))))) (* 1/2 (/ 1 (sqrt 2))))) (/ 1 (sqrt 2)))
1
(+ 1 (* -1/2 (pow th 2)))
(+ 1 (* (pow th 2) (- (* 1/24 (pow th 2)) 1/2)))
(+ 1 (* (pow th 2) (- (* (pow th 2) (+ 1/24 (* -1/720 (pow th 2)))) 1/2)))
(/ (cos th) (sqrt 2))
(cos th)
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(cos.f64 th)
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(sqrt.f64 #s(literal 2 binary64))

rewrite0.0ms (0%)

Memory
0.6MiB live, 0.6MiB allocated
Counts
4 → 4
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
(sqrt.f64 #s(literal 2 binary64))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
(cos.f64 th)
(sqrt.f64 #s(literal 2 binary64))

eval1.0ms (0.1%)

Memory
1.5MiB live, 1.5MiB allocated
Compiler

Compiled 189 to 20 computations (89.4% saved)

prune3.0ms (0.2%)

Memory
4.6MiB live, 4.6MiB allocated
Pruning

6 alts after pruning (1 fresh and 5 done)

PrunedKeptTotal
New617
Fresh000
Picked011
Done044
Total6612
Accuracy
99.6%
Counts
12 → 6
Alt Table
Click to see full alt table
StatusAccuracyProgram
99.6%
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
59.4%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
56.7%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
3.4%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Compiler

Compiled 146 to 96 computations (34.2% saved)

simplify0.0ms (0%)

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

Found 2 expressions of interest:

NewMetricScoreProgram
cost-diff0
(sqrt.f64 #s(literal 2 binary64))
cost-diff0
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
(sqrt.f64 #s(literal 2 binary64))
#s(literal 2 binary64)

localize30.0ms (1.9%)

Memory
9.1MiB live, 47.7MiB allocated
Localize:

Found 2 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(sqrt.f64 #s(literal 2 binary64))
accuracy61.84648541766057
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
Samples
24.0ms256×0valid
Compiler

Compiled 49 to 29 computations (40.8% saved)

Precisions
Click to see histograms. Total time spent on operations: 17.0ms
ival-cos: 6.0ms (34.8% of total)
ival-mult: 6.0ms (34.8% of total)
ival-div: 2.0ms (11.6% of total)
ival-sqrt: 2.0ms (11.6% of total)
ival-add: 1.0ms (5.8% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)
ival-assert: 0.0ms (0% of total)

series7.0ms (0.4%)

Memory
11.5MiB live, 11.5MiB allocated
Counts
2 → 9
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
(sqrt.f64 #s(literal 2 binary64))
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
Calls

9 calls:

TimeVariablePointExpression
1.0ms
th
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt 2))
1.0ms
th
@-inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt 2))
1.0ms
a1
@0
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt 2))
1.0ms
a1
@inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt 2))
1.0ms
a2
@-inf
((+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt 2))

simplify0.0ms (0%)

Memory
0.5MiB live, 0.5MiB allocated
Algorithm
egg-herbie
Counts
9 → 2
Calls
Call 1
Inputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(/ (* (pow a1 2) (cos th)) (sqrt 2))
(* (pow a1 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (* (pow a1 2) (sqrt 2)))))
(* (pow a2 2) (+ (/ (cos th) (sqrt 2)) (/ (* (pow a1 2) (cos th)) (* (pow a2 2) (sqrt 2)))))
(+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2)))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (* -1/2 (/ (pow a2 2) (sqrt 2))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (* 1/24 (/ (pow a2 2) (sqrt 2)))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
(+ (* (pow th 2) (+ (* -1/2 (/ (pow a1 2) (sqrt 2))) (+ (* -1/2 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* 1/24 (/ (pow a1 2) (sqrt 2))) (+ (* 1/24 (/ (pow a2 2) (sqrt 2))) (* (pow th 2) (+ (* -1/720 (/ (pow a1 2) (sqrt 2))) (* -1/720 (/ (pow a2 2) (sqrt 2))))))))))) (+ (/ (pow a1 2) (sqrt 2)) (/ (pow a2 2) (sqrt 2))))
Outputs
(/ (* (pow a2 2) (cos th)) (sqrt 2))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
(+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (pow a2 2) (cos th)) (sqrt 2)))
(sqrt.f64 #s(literal 2 binary64))

rewrite0.0ms (0%)

Memory
0.4MiB live, 0.4MiB allocated
Counts
2 → 2
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
(sqrt.f64 #s(literal 2 binary64))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
(sqrt.f64 #s(literal 2 binary64))

eval0.0ms (0%)

Memory
0.6MiB live, 0.6MiB allocated
Compiler

Compiled 86 to 16 computations (81.4% saved)

prune4.0ms (0.2%)

Memory
7.0MiB live, 7.0MiB allocated
Pruning

6 alts after pruning (0 fresh and 6 done)

PrunedKeptTotal
New303
Fresh000
Picked011
Done055
Total369
Accuracy
99.6%
Counts
9 → 6
Alt Table
Click to see full alt table
StatusAccuracyProgram
99.6%
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
59.4%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
56.7%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
3.4%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
4.1%
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Compiler

Compiled 292 to 122 computations (58.2% saved)

regimes23.0ms (1.4%)

Memory
1.0MiB live, 39.4MiB allocated
Counts
6 → 1
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Outputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Calls

8 calls:

4.0ms
(*.f64 a2 a2)
3.0ms
a1
3.0ms
a2
3.0ms
th
3.0ms
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
Results
AccuracySegmentsBranch
99.6%1a1
99.6%1a2
99.6%1th
99.6%1(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
99.6%1(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
99.6%1(cos.f64 th)
99.6%1(*.f64 a1 a1)
99.6%1(*.f64 a2 a2)
Compiler

Compiled 35 to 40 computations (-14.3% saved)

regimes20.0ms (1.2%)

Memory
-1.5MiB live, 37.5MiB allocated
Counts
5 → 2
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Calls

8 calls:

3.0ms
(*.f64 a2 a2)
2.0ms
a1
2.0ms
a2
2.0ms
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
2.0ms
th
Results
AccuracySegmentsBranch
84.7%3a1
88.0%3a2
66.5%3th
64.2%3(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
66.9%2(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
66.9%2(cos.f64 th)
82.5%2(*.f64 a1 a1)
88.0%2(*.f64 a2 a2)
Compiler

Compiled 35 to 40 computations (-14.3% saved)

regimes24.0ms (1.5%)

Memory
-4.8MiB live, 38.8MiB allocated
Counts
4 → 1
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
Calls

8 calls:

9.0ms
a2
2.0ms
th
2.0ms
a1
2.0ms
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
2.0ms
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Results
AccuracySegmentsBranch
56.7%1(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
56.7%1th
56.7%1(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
56.7%1(cos.f64 th)
56.7%1(*.f64 a1 a1)
56.7%1a1
56.7%1a2
56.7%1(*.f64 a2 a2)
Compiler

Compiled 35 to 40 computations (-14.3% saved)

regimes15.0ms (0.9%)

Memory
-15.1MiB live, 24.1MiB allocated
Counts
3 → 1
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
Calls

8 calls:

2.0ms
a2
2.0ms
a1
2.0ms
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
2.0ms
th
2.0ms
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
Results
AccuracySegmentsBranch
4.1%1(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
4.1%1(cos.f64 th)
4.1%1a1
4.1%1a2
4.1%1th
4.1%1(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
4.1%1(*.f64 a1 a1)
4.1%1(*.f64 a2 a2)
Compiler

Compiled 35 to 40 computations (-14.3% saved)

regimes13.0ms (0.8%)

Memory
-16.2MiB live, 22.9MiB allocated
Counts
2 → 1
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
Calls

8 calls:

2.0ms
th
1.0ms
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
1.0ms
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
1.0ms
a1
1.0ms
a2
Results
AccuracySegmentsBranch
4.1%1th
4.1%1(*.f64 a2 a2)
4.1%1a1
4.1%1a2
4.1%1(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
4.1%1(*.f64 a1 a1)
4.1%1(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
4.1%1(cos.f64 th)
Compiler

Compiled 35 to 40 computations (-14.3% saved)

regimes9.0ms (0.6%)

Memory
18.8MiB live, 18.8MiB allocated
Accuracy

Total -0.0b remaining (-0%)

Threshold costs -0b (-0%)

Counts
1 → 1
Calls
Call 1
Inputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
Outputs
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
Calls

8 calls:

1.0ms
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
1.0ms
(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
1.0ms
th
1.0ms
a2
1.0ms
a1
Results
AccuracySegmentsBranch
3.4%1(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
3.4%1(*.f64 a2 a2)
3.4%1a1
3.4%1(*.f64 a1 a1)
3.4%1(/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64)))
3.4%1(cos.f64 th)
3.4%1a2
3.4%1th
Compiler

Compiled 35 to 40 computations (-14.3% saved)

bsearch17.0ms (1.1%)

Memory
-17.8MiB live, 20.9MiB allocated
Algorithm
binary-search
Stop Event
narrow-enough
Steps
TimeLeftRight
14.0ms
5.145330431935084e+31
3.7232192415340353e+33
Samples
10.0ms112×0valid
Compiler

Compiled 414 to 291 computations (29.7% saved)

Precisions
Click to see histograms. Total time spent on operations: 7.0ms
ival-cos: 3.0ms (45% of total)
ival-mult: 2.0ms (30% of total)
ival-div: 1.0ms (15% of total)
ival-sqrt: 1.0ms (15% of total)
ival-true: 0.0ms (0% of total)
ival-add: 0.0ms (0% of total)
exact: 0.0ms (0% of total)
ival-assert: 0.0ms (0% of total)

simplify5.0ms (0.3%)

Memory
10.7MiB live, 10.7MiB allocated
Algorithm
egg-herbie
Calls
Call 1
Inputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(if (<=.f64 (*.f64 a2 a2) #s(literal 450000000000000033154929174511616 binary64)) #s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))) #s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))
Outputs
(+.f64 (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2)))
(if (<=.f64 (*.f64 a2 a2) #s(literal 450000000000000033154929174511616 binary64)) #s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1))) #s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a2 a2))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (*.f64 (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))) (*.f64 a1 a1)))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (/.f64 (cos.f64 th) (sqrt.f64 #s(literal 2 binary64))))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (cos.f64 th))
#s(approx (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) (sqrt.f64 #s(literal 2 binary64)))

soundness1.0ms (0.1%)

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

Compiled 181 to 29 computations (84% saved)

preprocess31.0ms (2%)

Memory
18.9MiB live, 58.4MiB allocated
Compiler

Compiled 400 to 82 computations (79.5% saved)

end0.0ms (0%)

Memory
0.0MiB live, 0.0MiB allocated

Profiling

Loading profile data...