Given's Rotation SVD example, simplified

Time bar (total: 2.0s)

start0.0ms (0%)

Memory
0.0MiB live, 0.0MiB allocated

analyze0.0ms (0%)

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

Compiled 19 to 11 computations (42.1% saved)

sample1.5s (76.6%)

Memory
49.8MiB live, 2 068.0MiB allocated
Samples
718.0ms2 838×2valid
296.0ms4 215×0valid
188.0ms1 203×1valid
Precisions
Click to see histograms. Total time spent on operations: 981.0ms
ival-hypot: 344.0ms (35.1% of total)
ival-sqrt: 130.0ms (13.3% of total)
ival-div: 126.0ms (12.8% of total)
adjust: 118.0ms (12% of total)
ival-mult: 97.0ms (9.9% of total)
ival-sub: 77.0ms (7.9% of total)
ival-add: 73.0ms (7.4% of total)
exact: 8.0ms (0.8% of total)
ival-true: 6.0ms (0.6% of total)
ival-assert: 3.0ms (0.3% of total)
Bogosity

explain170.0ms (8.6%)

Memory
2.1MiB live, 203.7MiB allocated
FPErrors
Click to see full error table
Ground TruthOverpredictionsExampleUnderpredictionsExampleSubexpression
470-1(0.334452984345287)(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
00-0-(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
00-0-#s(literal 1 binary64)
00-0-(hypot.f64 #s(literal 1 binary64) x)
00-0-(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
00-0-(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
00-0-(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
00-0-#s(literal 1/2 binary64)
00-0-x
Explanations
Click to see full explanations table
OperatorSubexpressionExplanationCount
-.f64(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))cancellation461
Confusion
Predicted +Predicted -
+461
-0209
Precision
1.0
Recall
0.9787234042553191
Confusion?
Predicted +Predicted MaybePredicted -
+4610
-00209
Precision?
1.0
Recall?
1.0
Freqs
test
numberfreq
0210
146
Total Confusion?
Predicted +Predicted MaybePredicted -
+100
-000
Precision?
1.0
Recall?
1.0
Samples
53.0ms188×2valid
21.0ms274×0valid
11.0ms50×1valid
Compiler

Compiled 223 to 40 computations (82.1% saved)

Precisions
Click to see histograms. Total time spent on operations: 61.0ms
ival-hypot: 24.0ms (39.1% of total)
adjust: 7.0ms (11.4% of total)
ival-div: 7.0ms (11.4% of total)
ival-sqrt: 7.0ms (11.4% of total)
ival-mult: 6.0ms (9.8% of total)
ival-sub: 5.0ms (8.2% of total)
ival-add: 4.0ms (6.5% of total)
exact: 1.0ms (1.6% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)

preprocess2.0ms (0.1%)

Memory
3.6MiB live, 3.6MiB allocated
Algorithm
egg-herbie
Calls
Call 1
Inputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Outputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Compiler

Compiled 12 to 9 computations (25% saved)

eval0.0ms (0%)

Memory
0.1MiB live, 0.1MiB allocated
Compiler

Compiled 0 to 1 computations (-∞% saved)

prune0.0ms (0%)

Memory
0.7MiB live, 0.7MiB allocated
Alt Table
Click to see full alt table
StatusAccuracyProgram
82.6%
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Compiler

Compiled 12 to 9 computations (25% saved)

simplify0.0ms (0%)

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

Found 4 expressions of interest:

NewMetricScoreProgram
cost-diff0
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
cost-diff0
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
cost-diff0
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
cost-diff0
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Calls
Call 1
Inputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
#s(literal 1 binary64)
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(literal 1/2 binary64)
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x
Outputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
#s(literal 1 binary64)
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(literal 1/2 binary64)
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x

localize58.0ms (2.9%)

Memory
-18.1MiB live, 61.8MiB allocated
Localize:

Found 4 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
accuracy0.0078125
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
accuracy0.0078125
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
accuracy11.145211063242854
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Samples
25.0ms94×2valid
20.0ms137×0valid
4.0ms25×1valid
Compiler

Compiled 130 to 20 computations (84.6% saved)

Precisions
Click to see histograms. Total time spent on operations: 29.0ms
ival-hypot: 11.0ms (37.7% of total)
ival-div: 4.0ms (13.7% of total)
ival-sqrt: 4.0ms (13.7% of total)
adjust: 3.0ms (10.3% of total)
ival-mult: 3.0ms (10.3% of total)
ival-sub: 2.0ms (6.8% of total)
ival-add: 2.0ms (6.8% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)

series5.0ms (0.2%)

Memory
9.0MiB live, 9.0MiB allocated
Counts
5 → 54
Calls
Call 1
Inputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
Outputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(* (sqrt 1/2) (sqrt 2))
(+ (* -1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2))) (* (sqrt 1/2) (sqrt 2)))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))))))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* (pow x 2) (+ (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))))))
1
(+ 1 (* -1/4 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
2
(+ 2 (* -1/2 (pow x 2)))
(+ 2 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 2 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(+ 1 (* -1/2 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(- 1 (sqrt 1/2))
(- (+ 1 (* -1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* 1/8 (/ (sqrt 1/2) (pow x 2)))) (+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x))))
(- (+ 1 (* 3/16 (/ (sqrt 1/2) (pow x 3)))) (+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
(sqrt 1/2)
(+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x))))
(+ (sqrt 1/2) (+ (* -3/16 (/ (sqrt 1/2) (pow x 3))) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
1/2
(+ 1/2 (* 1/2 (/ 1 x)))
(- (+ 1/2 (* 1/2 (/ 1 x))) (/ 1/4 (pow x 3)))
(- (+ 1/2 (+ (* 1/2 (/ 1 x)) (* 3/16 (/ 1 (pow x 5))))) (/ 1/4 (pow x 3)))
(+ 1 (/ 1 x))
(- (+ 1 (/ 1 x)) (/ 1/2 (pow x 3)))
(- (+ 1 (+ (/ 1 x) (* 3/8 (/ 1 (pow x 5))))) (/ 1/2 (pow x 3)))
(/ 1 x)
(/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x)
(- (+ 1 (* 1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1 (/ (- (* -3/16 (/ (sqrt 1/2) x)) (* -1/8 (sqrt 1/2))) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(+ (sqrt 1/2) (* -1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* 1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* -1 (/ (+ (* -1/8 (sqrt 1/2)) (* 3/16 (/ (sqrt 1/2) x))) x)) (* 1/2 (sqrt 1/2))) x)))
(- 1/2 (* 1/2 (/ 1 x)))
(+ 1/2 (* -1 (/ (- 1/2 (* 1/4 (/ 1 (pow x 2)))) x)))
(+ 1/2 (* -1 (/ (- (+ 1/2 (/ 3/16 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))) x)))
(- 1 (/ 1 x))
(+ 1 (* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)))
(+ 1 (* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)))
(/ -1 x)
(* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x))
Calls

3 calls:

TimeVariablePointExpression
2.0ms
x
@0
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))))
1.0ms
x
@inf
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))))
1.0ms
x
@-inf
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))))

simplify1.0ms (0%)

Memory
1.9MiB live, 1.9MiB allocated
Algorithm
egg-herbie
Counts
54 → 5
Calls
Call 1
Inputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(* (sqrt 1/2) (sqrt 2))
(+ (* -1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2))) (* (sqrt 1/2) (sqrt 2)))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))))))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* (pow x 2) (+ (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))))))
1
(+ 1 (* -1/4 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
2
(+ 2 (* -1/2 (pow x 2)))
(+ 2 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 2 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(+ 1 (* -1/2 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(- 1 (sqrt 1/2))
(- (+ 1 (* -1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* 1/8 (/ (sqrt 1/2) (pow x 2)))) (+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x))))
(- (+ 1 (* 3/16 (/ (sqrt 1/2) (pow x 3)))) (+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
(sqrt 1/2)
(+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x))))
(+ (sqrt 1/2) (+ (* -3/16 (/ (sqrt 1/2) (pow x 3))) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
1/2
(+ 1/2 (* 1/2 (/ 1 x)))
(- (+ 1/2 (* 1/2 (/ 1 x))) (/ 1/4 (pow x 3)))
(- (+ 1/2 (+ (* 1/2 (/ 1 x)) (* 3/16 (/ 1 (pow x 5))))) (/ 1/4 (pow x 3)))
(+ 1 (/ 1 x))
(- (+ 1 (/ 1 x)) (/ 1/2 (pow x 3)))
(- (+ 1 (+ (/ 1 x) (* 3/8 (/ 1 (pow x 5))))) (/ 1/2 (pow x 3)))
(/ 1 x)
(/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x)
(- (+ 1 (* 1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1 (/ (- (* -3/16 (/ (sqrt 1/2) x)) (* -1/8 (sqrt 1/2))) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(+ (sqrt 1/2) (* -1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* 1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* -1 (/ (+ (* -1/8 (sqrt 1/2)) (* 3/16 (/ (sqrt 1/2) x))) x)) (* 1/2 (sqrt 1/2))) x)))
(- 1/2 (* 1/2 (/ 1 x)))
(+ 1/2 (* -1 (/ (- 1/2 (* 1/4 (/ 1 (pow x 2)))) x)))
(+ 1/2 (* -1 (/ (- (+ 1/2 (/ 3/16 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))) x)))
(- 1 (/ 1 x))
(+ 1 (* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)))
(+ 1 (* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)))
(/ -1 x)
(* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x))
Outputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(* (sqrt 1/2) (sqrt 2))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))

rewrite0.0ms (0%)

Memory
0.9MiB live, 0.9MiB allocated
Counts
5 → 5
Calls
Call 1
Inputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
Outputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))

eval1.0ms (0.1%)

Memory
2.5MiB live, 2.5MiB allocated
Compiler

Compiled 193 to 26 computations (86.5% saved)

prune2.0ms (0.1%)

Memory
4.3MiB live, 4.3MiB allocated
Pruning

4 alts after pruning (3 fresh and 1 done)

PrunedKeptTotal
New7310
Fresh000
Picked011
Done000
Total7411
Accuracy
82.8%
Counts
11 → 4
Alt Table
Click to see full alt table
StatusAccuracyProgram
82.6%
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
39.3%
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
11.1%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
12.0%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Compiler

Compiled 87 to 61 computations (29.9% saved)

simplify1.0ms (0%)

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

Found 12 expressions of interest:

NewMetricScoreProgram
cost-diff0
(hypot.f64 #s(literal 1 binary64) x)
cost-diff0
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
cost-diff0
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
cost-diff0
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
cost-diff0
(hypot.f64 #s(literal 1 binary64) x)
cost-diff0
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
cost-diff0
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
cost-diff0
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
cost-diff0
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
cost-diff0
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
cost-diff0
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
cost-diff0
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(literal 1/2 binary64)
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(literal 1 binary64)
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(literal 1 binary64)
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(literal 1 binary64)
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(literal 1/2 binary64)
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(literal 1 binary64)
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(literal 1 binary64)
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(literal 1 binary64)
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
x

localize58.0ms (2.9%)

Memory
3.6MiB live, 119.8MiB allocated
Localize:

Found 12 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(hypot.f64 #s(literal 1 binary64) x)
accuracy0.0078125
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
accuracy11.145211063242854
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
accuracy32.32190592566728
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
accuracy0.0
(hypot.f64 #s(literal 1 binary64) x)
accuracy0.0
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
accuracy0.0078125
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
accuracy56.92530400757449
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
accuracy0.0
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
accuracy0.0
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
accuracy0.0078125
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
accuracy56.320881441949766
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Samples
31.0ms94×2valid
12.0ms137×0valid
5.0ms25×1valid
Compiler

Compiled 317 to 33 computations (89.6% saved)

Precisions
Click to see histograms. Total time spent on operations: 32.0ms
ival-hypot: 11.0ms (34.8% of total)
ival-mult: 5.0ms (15.8% of total)
ival-div: 4.0ms (12.6% of total)
ival-sqrt: 4.0ms (12.6% of total)
adjust: 3.0ms (9.5% of total)
ival-sub: 2.0ms (6.3% of total)
ival-add: 2.0ms (6.3% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)

series4.0ms (0.2%)

Memory
-37.4MiB live, 5.0MiB allocated
Counts
8 → 65
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(hypot.f64 #s(literal 1 binary64) x)
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
Outputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
1
(+ 1 (* -1/4 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
2
(+ 2 (* -1/2 (pow x 2)))
(+ 2 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 2 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(+ 1 (* -1/2 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(+ 1 (* 1/2 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/2 (* -1/8 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/2 (* (pow x 2) (- (* 1/16 (pow x 2)) 1/8)))))
(* (sqrt 1/2) (sqrt 2))
(+ (* -1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2))) (* (sqrt 1/2) (sqrt 2)))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))))))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* (pow x 2) (+ (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))))))
(- 1 (sqrt 1/2))
(- (+ 1 (* -1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* 1/8 (/ (sqrt 1/2) (pow x 2)))) (+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x))))
(- (+ 1 (* 3/16 (/ (sqrt 1/2) (pow x 3)))) (+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
1/2
(+ 1/2 (* 1/2 (/ 1 x)))
(- (+ 1/2 (* 1/2 (/ 1 x))) (/ 1/4 (pow x 3)))
(- (+ 1/2 (+ (* 1/2 (/ 1 x)) (* 3/16 (/ 1 (pow x 5))))) (/ 1/4 (pow x 3)))
(+ 1 (/ 1 x))
(- (+ 1 (/ 1 x)) (/ 1/2 (pow x 3)))
(- (+ 1 (+ (/ 1 x) (* 3/8 (/ 1 (pow x 5))))) (/ 1/2 (pow x 3)))
(/ 1 x)
(/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x)
x
(* x (+ 1 (* 1/2 (/ 1 (pow x 2)))))
(* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4))))
(* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4))))
(sqrt 1/2)
(+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x))))
(+ (sqrt 1/2) (+ (* -3/16 (/ (sqrt 1/2) (pow x 3))) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
(- (+ 1 (* 1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1 (/ (- (* -3/16 (/ (sqrt 1/2) x)) (* -1/8 (sqrt 1/2))) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- 1/2 (* 1/2 (/ 1 x)))
(+ 1/2 (* -1 (/ (- 1/2 (* 1/4 (/ 1 (pow x 2)))) x)))
(+ 1/2 (* -1 (/ (- (+ 1/2 (/ 3/16 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))) x)))
(- 1 (/ 1 x))
(+ 1 (* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)))
(+ 1 (* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)))
(/ -1 x)
(* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x))
(* -1 x)
(* -1 (* x (+ 1 (* 1/2 (/ 1 (pow x 2))))))
(* -1 (* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4)))))
(* -1 (* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4)))))
(+ (sqrt 1/2) (* -1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* 1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* -1 (/ (+ (* -1/8 (sqrt 1/2)) (* 3/16 (/ (sqrt 1/2) x))) x)) (* 1/2 (sqrt 1/2))) x)))
Calls

3 calls:

TimeVariablePointExpression
1.0ms
x
@inf
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (+ (* 1 1) (* x x))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))))
1.0ms
x
@0
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (+ (* 1 1) (* x x))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))))
0.0ms
x
@-inf
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (+ (* 1 1) (* x x))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))))

simplify1.0ms (0.1%)

Memory
2.0MiB live, 2.0MiB allocated
Algorithm
egg-herbie
Counts
65 → 8
Calls
Call 1
Inputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
1
(+ 1 (* -1/4 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
2
(+ 2 (* -1/2 (pow x 2)))
(+ 2 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 2 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(+ 1 (* -1/2 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(+ 1 (* 1/2 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/2 (* -1/8 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/2 (* (pow x 2) (- (* 1/16 (pow x 2)) 1/8)))))
(* (sqrt 1/2) (sqrt 2))
(+ (* -1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2))) (* (sqrt 1/2) (sqrt 2)))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))))))
(+ (* (sqrt 1/2) (sqrt 2)) (* (pow x 2) (+ (* -1/4 (/ (sqrt 1/2) (sqrt 2))) (* (pow x 2) (+ (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))))))
(- 1 (sqrt 1/2))
(- (+ 1 (* -1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* 1/8 (/ (sqrt 1/2) (pow x 2)))) (+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x))))
(- (+ 1 (* 3/16 (/ (sqrt 1/2) (pow x 3)))) (+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
1/2
(+ 1/2 (* 1/2 (/ 1 x)))
(- (+ 1/2 (* 1/2 (/ 1 x))) (/ 1/4 (pow x 3)))
(- (+ 1/2 (+ (* 1/2 (/ 1 x)) (* 3/16 (/ 1 (pow x 5))))) (/ 1/4 (pow x 3)))
(+ 1 (/ 1 x))
(- (+ 1 (/ 1 x)) (/ 1/2 (pow x 3)))
(- (+ 1 (+ (/ 1 x) (* 3/8 (/ 1 (pow x 5))))) (/ 1/2 (pow x 3)))
(/ 1 x)
(/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x)
x
(* x (+ 1 (* 1/2 (/ 1 (pow x 2)))))
(* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4))))
(* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4))))
(sqrt 1/2)
(+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x))))
(+ (sqrt 1/2) (+ (* -3/16 (/ (sqrt 1/2) (pow x 3))) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
(- (+ 1 (* 1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1 (/ (- (* -3/16 (/ (sqrt 1/2) x)) (* -1/8 (sqrt 1/2))) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- 1/2 (* 1/2 (/ 1 x)))
(+ 1/2 (* -1 (/ (- 1/2 (* 1/4 (/ 1 (pow x 2)))) x)))
(+ 1/2 (* -1 (/ (- (+ 1/2 (/ 3/16 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))) x)))
(- 1 (/ 1 x))
(+ 1 (* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)))
(+ 1 (* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)))
(/ -1 x)
(* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x))
(* -1 x)
(* -1 (* x (+ 1 (* 1/2 (/ 1 (pow x 2))))))
(* -1 (* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4)))))
(* -1 (* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4)))))
(+ (sqrt 1/2) (* -1/2 (/ (sqrt 1/2) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* 1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x)))
(+ (sqrt 1/2) (* -1 (/ (+ (* -1 (/ (+ (* -1/8 (sqrt 1/2)) (* 3/16 (/ (sqrt 1/2) x))) x)) (* 1/2 (sqrt 1/2))) x)))
Outputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
1
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+ 1 (* -1/4 (pow x 2)))
(hypot.f64 #s(literal 1 binary64) x)
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))

rewrite1.0ms (0%)

Memory
1.2MiB live, 1.2MiB allocated
Counts
8 → 8
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(hypot.f64 #s(literal 1 binary64) x)
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(hypot.f64 #s(literal 1 binary64) x)
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))

eval2.0ms (0.1%)

Memory
4.0MiB live, 4.0MiB allocated
Compiler

Compiled 599 to 32 computations (94.7% saved)

prune4.0ms (0.2%)

Memory
8.1MiB live, 8.1MiB allocated
Pruning

5 alts after pruning (2 fresh and 3 done)

PrunedKeptTotal
New17219
Fresh000
Picked123
Done011
Total18523
Accuracy
82.8%
Counts
23 → 5
Alt Table
Click to see full alt table
StatusAccuracyProgram
82.6%
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
39.3%
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
4.7%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
12.0%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
4.7%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Compiler

Compiled 121 to 76 computations (37.2% saved)

simplify1.0ms (0%)

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

Found 6 expressions of interest:

NewMetricScoreProgram
cost-diff0
(hypot.f64 #s(literal 1 binary64) x)
cost-diff0
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
cost-diff0
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
cost-diff0
(hypot.f64 #s(literal 1 binary64) x)
cost-diff0
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
cost-diff0
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
#s(literal 1 binary64)
x
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
#s(literal 1 binary64)
(hypot.f64 #s(literal 1 binary64) x)
x
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
#s(literal 1 binary64)
x
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
#s(literal 1 binary64)
(hypot.f64 #s(literal 1 binary64) x)
x

localize50.0ms (2.5%)

Memory
-2.5MiB live, 74.5MiB allocated
Localize:

Found 6 expressions of interest:

NewMetricScoreProgram
accuracy0.0
(hypot.f64 #s(literal 1 binary64) x)
accuracy0.0078125
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
accuracy60.99484500671133
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
accuracy0.0
(hypot.f64 #s(literal 1 binary64) x)
accuracy32.33202850075382
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
accuracy56.320881441949766
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Samples
26.0ms94×2valid
11.0ms137×0valid
4.0ms25×1valid
Compiler

Compiled 172 to 29 computations (83.1% saved)

Precisions
Click to see histograms. Total time spent on operations: 30.0ms
ival-hypot: 10.0ms (33.7% of total)
ival-div: 4.0ms (13.5% of total)
ival-sqrt: 4.0ms (13.5% of total)
adjust: 3.0ms (10.1% of total)
ival-mult: 3.0ms (10.1% of total)
ival-sub: 2.0ms (6.7% of total)
ival-add: 2.0ms (6.7% of total)
ival-assert: 0.0ms (0% of total)
ival-true: 0.0ms (0% of total)
exact: 0.0ms (0% of total)

series2.0ms (0.1%)

Memory
2.2MiB live, 2.2MiB allocated
Counts
5 → 44
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
Outputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
1
(+ 1 (* -1/4 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
(+ 1 (* 1/2 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/2 (* -1/8 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/2 (* (pow x 2) (- (* 1/16 (pow x 2)) 1/8)))))
(+ 1 (* -1/2 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(- 1 (sqrt 1/2))
(- (+ 1 (* -1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* 1/8 (/ (sqrt 1/2) (pow x 2)))) (+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x))))
(- (+ 1 (* 3/16 (/ (sqrt 1/2) (pow x 3)))) (+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
1/2
(+ 1/2 (* 1/2 (/ 1 x)))
(- (+ 1/2 (* 1/2 (/ 1 x))) (/ 1/4 (pow x 3)))
(- (+ 1/2 (+ (* 1/2 (/ 1 x)) (* 3/16 (/ 1 (pow x 5))))) (/ 1/4 (pow x 3)))
x
(* x (+ 1 (* 1/2 (/ 1 (pow x 2)))))
(* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4))))
(* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4))))
(/ 1 x)
(/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x)
(- (+ 1 (* 1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1 (/ (- (* -3/16 (/ (sqrt 1/2) x)) (* -1/8 (sqrt 1/2))) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- 1/2 (* 1/2 (/ 1 x)))
(+ 1/2 (* -1 (/ (- 1/2 (* 1/4 (/ 1 (pow x 2)))) x)))
(+ 1/2 (* -1 (/ (- (+ 1/2 (/ 3/16 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))) x)))
(* -1 x)
(* -1 (* x (+ 1 (* 1/2 (/ 1 (pow x 2))))))
(* -1 (* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4)))))
(* -1 (* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4)))))
(/ -1 x)
(* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x))
Calls

3 calls:

TimeVariablePointExpression
0.0ms
x
@0
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (sqrt (+ (* 1 1) (* x x))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))))
0.0ms
x
@inf
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (sqrt (+ (* 1 1) (* x x))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))))
0.0ms
x
@-inf
((- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (sqrt (+ (* 1 1) (* x x))) (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/ 1 (sqrt (+ (* 1 1) (* x x)))))

simplify1.0ms (0%)

Memory
1.1MiB live, 1.1MiB allocated
Algorithm
egg-herbie
Counts
44 → 5
Calls
Call 1
Inputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
1
(+ 1 (* -1/4 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/16 (pow x 2)) 1/4)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/16 (* -5/32 (pow x 2)))) 1/4)))
(+ 1 (* 1/2 (pow x 2)))
(+ 1 (* (pow x 2) (+ 1/2 (* -1/8 (pow x 2)))))
(+ 1 (* (pow x 2) (+ 1/2 (* (pow x 2) (- (* 1/16 (pow x 2)) 1/8)))))
(+ 1 (* -1/2 (pow x 2)))
(+ 1 (* (pow x 2) (- (* 3/8 (pow x 2)) 1/2)))
(+ 1 (* (pow x 2) (- (* (pow x 2) (+ 3/8 (* -5/16 (pow x 2)))) 1/2)))
(- 1 (sqrt 1/2))
(- (+ 1 (* -1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* 1/8 (/ (sqrt 1/2) (pow x 2)))) (+ (sqrt 1/2) (* 1/2 (/ (sqrt 1/2) x))))
(- (+ 1 (* 3/16 (/ (sqrt 1/2) (pow x 3)))) (+ (sqrt 1/2) (+ (* -1/8 (/ (sqrt 1/2) (pow x 2))) (* 1/2 (/ (sqrt 1/2) x)))))
1/2
(+ 1/2 (* 1/2 (/ 1 x)))
(- (+ 1/2 (* 1/2 (/ 1 x))) (/ 1/4 (pow x 3)))
(- (+ 1/2 (+ (* 1/2 (/ 1 x)) (* 3/16 (/ 1 (pow x 5))))) (/ 1/4 (pow x 3)))
x
(* x (+ 1 (* 1/2 (/ 1 (pow x 2)))))
(* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4))))
(* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4))))
(/ 1 x)
(/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x)
(/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x)
(- (+ 1 (* 1/2 (/ (sqrt 1/2) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1/8 (/ (sqrt 1/2) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- (+ 1 (* -1 (/ (- (* -1 (/ (- (* -3/16 (/ (sqrt 1/2) x)) (* -1/8 (sqrt 1/2))) x)) (* 1/2 (sqrt 1/2))) x))) (sqrt 1/2))
(- 1/2 (* 1/2 (/ 1 x)))
(+ 1/2 (* -1 (/ (- 1/2 (* 1/4 (/ 1 (pow x 2)))) x)))
(+ 1/2 (* -1 (/ (- (+ 1/2 (/ 3/16 (pow x 4))) (* 1/4 (/ 1 (pow x 2)))) x)))
(* -1 x)
(* -1 (* x (+ 1 (* 1/2 (/ 1 (pow x 2))))))
(* -1 (* x (- (+ 1 (* 1/2 (/ 1 (pow x 2)))) (/ 1/8 (pow x 4)))))
(* -1 (* x (- (+ 1 (+ (* 1/2 (/ 1 (pow x 2))) (* 1/16 (/ 1 (pow x 6))))) (/ 1/8 (pow x 4)))))
(/ -1 x)
(* -1 (/ (- 1 (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (* 1/2 (/ 1 (pow x 2)))) x))
(* -1 (/ (- (+ 1 (/ 3/8 (pow x 4))) (+ (* 1/2 (/ 1 (pow x 2))) (* 5/16 (/ 1 (pow x 6))))) x))
Outputs
(- 1 (* (sqrt 1/2) (sqrt 2)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
(- (+ 1 (* 1/4 (/ (* (pow x 2) (sqrt 1/2)) (sqrt 2)))) (* (sqrt 1/2) (sqrt 2)))
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
(- (+ 1 (* (pow x 2) (- (* -1/2 (/ (* (pow x 2) (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))))) (sqrt 2))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
(hypot.f64 #s(literal 1 binary64) x)
(- (+ 1 (* (pow x 2) (- (* (pow x 2) (- (* 1/2 (/ (* (pow x 2) (* (sqrt 1/2) (+ 5/16 (* -1/4 (/ (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2)))) (pow (sqrt 2) 2)))))) (sqrt 2))) (* 1/2 (/ (* (sqrt 1/2) (- 3/8 (* 1/16 (/ 1 (pow (sqrt 2) 2))))) (sqrt 2))))) (* -1/4 (/ (sqrt 1/2) (sqrt 2)))))) (* (sqrt 1/2) (sqrt 2)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
1
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))

rewrite0.0ms (0%)

Memory
0.7MiB live, 0.7MiB allocated
Counts
5 → 5
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x))
(hypot.f64 #s(literal 1 binary64) x)
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))

eval1.0ms (0.1%)

Memory
1.8MiB live, 1.8MiB allocated
Compiler

Compiled 331 to 23 computations (93.1% saved)

prune6.0ms (0.3%)

Memory
8.2MiB live, 8.2MiB allocated
Pruning

5 alts after pruning (0 fresh and 5 done)

PrunedKeptTotal
New10010
Fresh000
Picked022
Done033
Total10515
Accuracy
82.8%
Counts
15 → 5
Alt Table
Click to see full alt table
StatusAccuracyProgram
82.6%
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
39.3%
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
4.7%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
12.0%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
4.7%
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Compiler

Compiled 267 to 103 computations (61.4% saved)

regimes17.0ms (0.8%)

Memory
-13.5MiB live, 24.8MiB allocated
Counts
6 → 1
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Outputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Calls

7 calls:

3.0ms
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
2.0ms
x
2.0ms
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
2.0ms
(hypot.f64 #s(literal 1 binary64) x)
2.0ms
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
Results
AccuracySegmentsBranch
82.6%1x
82.6%1(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
82.6%1(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
82.6%1(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
82.6%1(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
82.6%1(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
82.6%1(hypot.f64 #s(literal 1 binary64) x)
Compiler

Compiled 47 to 37 computations (21.3% saved)

regimes14.0ms (0.7%)

Memory
23.3MiB live, 23.3MiB allocated
Counts
5 → 1
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Outputs
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
Calls

7 calls:

2.0ms
x
2.0ms
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
2.0ms
(hypot.f64 #s(literal 1 binary64) x)
2.0ms
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
2.0ms
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Results
AccuracySegmentsBranch
39.3%1x
39.3%1(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
39.3%1(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
39.3%1(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
39.3%1(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
39.3%1(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
39.3%1(hypot.f64 #s(literal 1 binary64) x)
Compiler

Compiled 47 to 37 computations (21.3% saved)

regimes13.0ms (0.6%)

Memory
-22.0MiB live, 19.1MiB allocated
Counts
3 → 1
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
Calls

7 calls:

3.0ms
x
2.0ms
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
1.0ms
(hypot.f64 #s(literal 1 binary64) x)
1.0ms
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
1.0ms
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Results
AccuracySegmentsBranch
11.1%1(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
11.1%1(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
11.1%1(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
11.1%1(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
11.1%1x
11.1%1(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
11.1%1(hypot.f64 #s(literal 1 binary64) x)
Compiler

Compiled 47 to 37 computations (21.3% saved)

regimes9.0ms (0.5%)

Memory
16.9MiB live, 16.9MiB allocated
Counts
2 → 1
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
Calls

7 calls:

1.0ms
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
1.0ms
x
1.0ms
(hypot.f64 #s(literal 1 binary64) x)
1.0ms
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
1.0ms
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Results
AccuracySegmentsBranch
4.7%1(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
4.7%1(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
4.7%1(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
4.7%1(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
4.7%1x
4.7%1(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
4.7%1(hypot.f64 #s(literal 1 binary64) x)
Compiler

Compiled 47 to 37 computations (21.3% saved)

regimes8.0ms (0.4%)

Memory
-23.8MiB live, 15.2MiB allocated
Accuracy

Total -0.0b remaining (-0%)

Threshold costs -0b (-0%)

Counts
1 → 1
Calls
Call 1
Inputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Outputs
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Calls

7 calls:

2.0ms
x
1.0ms
(hypot.f64 #s(literal 1 binary64) x)
1.0ms
(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
1.0ms
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
1.0ms
(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
Results
AccuracySegmentsBranch
4.7%1(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
4.7%1(hypot.f64 #s(literal 1 binary64) x)
4.7%1x
4.7%1(/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))
4.7%1(sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))))
4.7%1(*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
4.7%1(+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
Compiler

Compiled 47 to 37 computations (21.3% saved)

simplify5.0ms (0.2%)

Memory
8.8MiB live, 8.8MiB allocated
Algorithm
egg-herbie
Calls
Call 1
Inputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))
Outputs
(-.f64 #s(literal 1 binary64) (sqrt.f64 (*.f64 #s(literal 1/2 binary64) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))))
(-.f64 #s(literal 1 binary64) #s(approx (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (+.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x))))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) (/.f64 #s(literal 1 binary64) (hypot.f64 #s(literal 1 binary64) x)))
#s(approx (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))))) #s(approx (* 1/2 (+ 1 (/ 1 (sqrt (+ (* 1 1) (* x x)))))) (hypot.f64 #s(literal 1 binary64) x)))

soundness1.0ms (0%)

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

Compiled 119 to 26 computations (78.2% saved)

preprocess27.0ms (1.3%)

Memory
3.5MiB live, 41.5MiB allocated
Compiler

Compiled 262 to 70 computations (73.3% saved)

end0.0ms (0%)

Memory
0.0MiB live, 0.0MiB allocated

Profiling

Loading profile data...