
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* l (/ l x)))
(t_2
(/
t
(sqrt
(* 0.5 (+ t_1 (fma 2.0 (/ t (/ x t)) (fma 2.0 (* t t) t_1)))))))
(t_3 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -1.46e+145)
(/ t (- t))
(if (<= t -2.7e-197)
t_2
(if (<= t -1e-302) (- t_3) (if (<= t 1.15e+23) t_2 t_3))))))
double code(double x, double l, double t) {
double t_1 = l * (l / x);
double t_2 = t / sqrt((0.5 * (t_1 + fma(2.0, (t / (x / t)), fma(2.0, (t * t), t_1)))));
double t_3 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1.46e+145) {
tmp = t / -t;
} else if (t <= -2.7e-197) {
tmp = t_2;
} else if (t <= -1e-302) {
tmp = -t_3;
} else if (t <= 1.15e+23) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, l, t) t_1 = Float64(l * Float64(l / x)) t_2 = Float64(t / sqrt(Float64(0.5 * Float64(t_1 + fma(2.0, Float64(t / Float64(x / t)), fma(2.0, Float64(t * t), t_1)))))) t_3 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1.46e+145) tmp = Float64(t / Float64(-t)); elseif (t <= -2.7e-197) tmp = t_2; elseif (t <= -1e-302) tmp = Float64(-t_3); elseif (t <= 1.15e+23) tmp = t_2; else tmp = t_3; end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Sqrt[N[(0.5 * N[(t$95$1 + N[(2.0 * N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.46e+145], N[(t / (-t)), $MachinePrecision], If[LessEqual[t, -2.7e-197], t$95$2, If[LessEqual[t, -1e-302], (-t$95$3), If[LessEqual[t, 1.15e+23], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{x}\\
t_2 := \frac{t}{\sqrt{0.5 \cdot \left(t_1 + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)\right)}}\\
t_3 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.46 \cdot 10^{+145}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-302}:\\
\;\;\;\;-t_3\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -1.45999999999999988e145Initial program 7.1%
associate-*l/7.1%
Simplified7.1%
*-commutative7.1%
clear-num7.2%
un-div-inv7.1%
sqrt-undiv7.2%
metadata-eval7.2%
sub-neg7.2%
associate-*l/2.4%
sub-neg2.4%
metadata-eval2.4%
Applied egg-rr2.4%
+-commutative2.4%
*-commutative2.4%
+-commutative2.4%
+-commutative2.4%
Simplified2.4%
Taylor expanded in x around inf 7.9%
unpow27.9%
Simplified7.9%
Taylor expanded in t around -inf 97.7%
mul-1-neg97.7%
Simplified97.7%
if -1.45999999999999988e145 < t < -2.70000000000000017e-197 or -9.9999999999999996e-303 < t < 1.15e23Initial program 42.5%
associate-*l/42.5%
Simplified42.5%
*-commutative42.5%
clear-num42.5%
un-div-inv42.5%
sqrt-undiv42.7%
metadata-eval42.7%
sub-neg42.7%
associate-*l/34.1%
sub-neg34.1%
metadata-eval34.1%
Applied egg-rr34.1%
+-commutative34.1%
*-commutative34.1%
+-commutative34.1%
+-commutative34.1%
Simplified34.1%
Taylor expanded in x around inf 78.4%
cancel-sign-sub-inv78.4%
fma-def78.4%
unpow278.4%
fma-def78.4%
unpow278.4%
unpow278.4%
metadata-eval78.4%
unpow278.4%
unpow278.4%
fma-udef78.4%
*-lft-identity78.4%
fma-udef78.4%
unpow278.4%
unpow278.4%
Simplified78.4%
Taylor expanded in l around inf 78.0%
unpow278.0%
Simplified78.0%
expm1-log1p-u75.6%
expm1-udef41.9%
Applied egg-rr50.6%
expm1-def84.3%
expm1-log1p87.3%
*-commutative87.3%
associate-/r/87.4%
associate-/l*87.4%
associate-/r/87.3%
Simplified87.3%
if -2.70000000000000017e-197 < t < -9.9999999999999996e-303Initial program 6.8%
associate-*l/6.8%
Simplified6.8%
Taylor expanded in t around inf 2.8%
+-commutative2.8%
associate-*r/2.8%
sub-neg2.8%
metadata-eval2.8%
unpow22.8%
+-commutative2.8%
Simplified2.8%
Taylor expanded in t around -inf 64.3%
mul-1-neg64.3%
sub-neg64.3%
metadata-eval64.3%
Simplified64.3%
if 1.15e23 < t Initial program 33.3%
associate-*l/33.4%
Simplified33.4%
Taylor expanded in t around inf 17.9%
+-commutative17.9%
associate-*r/40.9%
sub-neg40.9%
metadata-eval40.9%
unpow240.9%
+-commutative40.9%
Simplified40.9%
Taylor expanded in t around 0 96.9%
Final simplification89.0%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ t (- t))) (t_2 (/ t (/ l (sqrt x)))))
(if (<= t -5.2e-104)
t_1
(if (<= t -4.5e-197)
t_2
(if (<= t -1.8e-302)
t_1
(if (<= t 1.35e-140) t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
double t_1 = t / -t;
double t_2 = t / (l / sqrt(x));
double tmp;
if (t <= -5.2e-104) {
tmp = t_1;
} else if (t <= -4.5e-197) {
tmp = t_2;
} else if (t <= -1.8e-302) {
tmp = t_1;
} else if (t <= 1.35e-140) {
tmp = t_2;
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / -t
t_2 = t / (l / sqrt(x))
if (t <= (-5.2d-104)) then
tmp = t_1
else if (t <= (-4.5d-197)) then
tmp = t_2
else if (t <= (-1.8d-302)) then
tmp = t_1
else if (t <= 1.35d-140) then
tmp = t_2
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t / -t;
double t_2 = t / (l / Math.sqrt(x));
double tmp;
if (t <= -5.2e-104) {
tmp = t_1;
} else if (t <= -4.5e-197) {
tmp = t_2;
} else if (t <= -1.8e-302) {
tmp = t_1;
} else if (t <= 1.35e-140) {
tmp = t_2;
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): t_1 = t / -t t_2 = t / (l / math.sqrt(x)) tmp = 0 if t <= -5.2e-104: tmp = t_1 elif t <= -4.5e-197: tmp = t_2 elif t <= -1.8e-302: tmp = t_1 elif t <= 1.35e-140: tmp = t_2 else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) t_1 = Float64(t / Float64(-t)) t_2 = Float64(t / Float64(l / sqrt(x))) tmp = 0.0 if (t <= -5.2e-104) tmp = t_1; elseif (t <= -4.5e-197) tmp = t_2; elseif (t <= -1.8e-302) tmp = t_1; elseif (t <= 1.35e-140) tmp = t_2; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t / -t; t_2 = t / (l / sqrt(x)); tmp = 0.0; if (t <= -5.2e-104) tmp = t_1; elseif (t <= -4.5e-197) tmp = t_2; elseif (t <= -1.8e-302) tmp = t_1; elseif (t <= 1.35e-140) tmp = t_2; else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e-104], t$95$1, If[LessEqual[t, -4.5e-197], t$95$2, If[LessEqual[t, -1.8e-302], t$95$1, If[LessEqual[t, 1.35e-140], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{-t}\\
t_2 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-140}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -5.20000000000000005e-104 or -4.5000000000000001e-197 < t < -1.8e-302Initial program 32.7%
associate-*l/32.7%
Simplified32.7%
*-commutative32.7%
clear-num32.7%
un-div-inv32.7%
sqrt-undiv32.9%
metadata-eval32.9%
sub-neg32.9%
associate-*l/20.3%
sub-neg20.3%
metadata-eval20.3%
Applied egg-rr20.3%
+-commutative20.3%
*-commutative20.3%
+-commutative20.3%
+-commutative20.3%
Simplified20.3%
Taylor expanded in x around inf 37.1%
unpow237.1%
Simplified37.1%
Taylor expanded in t around -inf 82.0%
mul-1-neg82.0%
Simplified82.0%
if -5.20000000000000005e-104 < t < -4.5000000000000001e-197 or -1.8e-302 < t < 1.35e-140Initial program 10.6%
associate-*l/10.6%
Simplified10.6%
*-commutative10.6%
clear-num10.6%
un-div-inv10.6%
sqrt-undiv10.6%
metadata-eval10.6%
sub-neg10.6%
associate-*l/13.2%
sub-neg13.2%
metadata-eval13.2%
Applied egg-rr13.2%
+-commutative13.2%
*-commutative13.2%
+-commutative13.2%
+-commutative13.2%
Simplified13.2%
Taylor expanded in x around inf 67.5%
cancel-sign-sub-inv67.5%
fma-def67.5%
unpow267.5%
fma-def67.5%
unpow267.5%
unpow267.5%
metadata-eval67.5%
unpow267.5%
unpow267.5%
fma-udef67.5%
*-lft-identity67.5%
fma-udef67.5%
unpow267.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 47.9%
associate-*l*47.9%
*-commutative47.9%
associate-*l*48.0%
Simplified48.0%
expm1-log1p-u39.1%
expm1-udef24.9%
associate-*r*24.9%
sqrt-unprod24.9%
metadata-eval24.9%
metadata-eval24.9%
*-un-lft-identity24.9%
add-sqr-sqrt24.3%
sqrt-prod35.6%
sqrt-prod35.9%
div-inv35.9%
sqrt-div35.6%
sqrt-prod24.3%
add-sqr-sqrt24.9%
Applied egg-rr24.9%
expm1-def39.2%
expm1-log1p48.2%
Simplified48.2%
if 1.35e-140 < t Initial program 38.4%
associate-*l/38.4%
Simplified38.4%
Taylor expanded in t around inf 36.3%
+-commutative36.3%
associate-*r/49.9%
sub-neg49.9%
metadata-eval49.9%
unpow249.9%
+-commutative49.9%
Simplified49.9%
Taylor expanded in t around 0 83.1%
Final simplification77.0%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ t (/ l (sqrt x))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (- t_2)))
(if (<= t -5.2e-104)
t_3
(if (<= t -7e-197)
t_1
(if (<= t -1.8e-302) t_3 (if (<= t 1.8e-142) t_1 t_2))))))
double code(double x, double l, double t) {
double t_1 = t / (l / sqrt(x));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = -t_2;
double tmp;
if (t <= -5.2e-104) {
tmp = t_3;
} else if (t <= -7e-197) {
tmp = t_1;
} else if (t <= -1.8e-302) {
tmp = t_3;
} else if (t <= 1.8e-142) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t / (l / sqrt(x))
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_3 = -t_2
if (t <= (-5.2d-104)) then
tmp = t_3
else if (t <= (-7d-197)) then
tmp = t_1
else if (t <= (-1.8d-302)) then
tmp = t_3
else if (t <= 1.8d-142) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t / (l / Math.sqrt(x));
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = -t_2;
double tmp;
if (t <= -5.2e-104) {
tmp = t_3;
} else if (t <= -7e-197) {
tmp = t_1;
} else if (t <= -1.8e-302) {
tmp = t_3;
} else if (t <= 1.8e-142) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, l, t): t_1 = t / (l / math.sqrt(x)) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) t_3 = -t_2 tmp = 0 if t <= -5.2e-104: tmp = t_3 elif t <= -7e-197: tmp = t_1 elif t <= -1.8e-302: tmp = t_3 elif t <= 1.8e-142: tmp = t_1 else: tmp = t_2 return tmp
function code(x, l, t) t_1 = Float64(t / Float64(l / sqrt(x))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(-t_2) tmp = 0.0 if (t <= -5.2e-104) tmp = t_3; elseif (t <= -7e-197) tmp = t_1; elseif (t <= -1.8e-302) tmp = t_3; elseif (t <= 1.8e-142) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, l, t) t_1 = t / (l / sqrt(x)); t_2 = sqrt(((x + -1.0) / (x + 1.0))); t_3 = -t_2; tmp = 0.0; if (t <= -5.2e-104) tmp = t_3; elseif (t <= -7e-197) tmp = t_1; elseif (t <= -1.8e-302) tmp = t_3; elseif (t <= 1.8e-142) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = (-t$95$2)}, If[LessEqual[t, -5.2e-104], t$95$3, If[LessEqual[t, -7e-197], t$95$1, If[LessEqual[t, -1.8e-302], t$95$3, If[LessEqual[t, 1.8e-142], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := -t_2\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-104}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -5.20000000000000005e-104 or -6.9999999999999996e-197 < t < -1.8e-302Initial program 32.7%
associate-*l/32.7%
Simplified32.7%
Taylor expanded in t around inf 22.6%
+-commutative22.6%
associate-*r/37.8%
sub-neg37.8%
metadata-eval37.8%
unpow237.8%
+-commutative37.8%
Simplified37.8%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
sub-neg82.9%
metadata-eval82.9%
Simplified82.9%
if -5.20000000000000005e-104 < t < -6.9999999999999996e-197 or -1.8e-302 < t < 1.8e-142Initial program 10.6%
associate-*l/10.6%
Simplified10.6%
*-commutative10.6%
clear-num10.6%
un-div-inv10.6%
sqrt-undiv10.6%
metadata-eval10.6%
sub-neg10.6%
associate-*l/13.2%
sub-neg13.2%
metadata-eval13.2%
Applied egg-rr13.2%
+-commutative13.2%
*-commutative13.2%
+-commutative13.2%
+-commutative13.2%
Simplified13.2%
Taylor expanded in x around inf 67.5%
cancel-sign-sub-inv67.5%
fma-def67.5%
unpow267.5%
fma-def67.5%
unpow267.5%
unpow267.5%
metadata-eval67.5%
unpow267.5%
unpow267.5%
fma-udef67.5%
*-lft-identity67.5%
fma-udef67.5%
unpow267.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 47.9%
associate-*l*47.9%
*-commutative47.9%
associate-*l*48.0%
Simplified48.0%
expm1-log1p-u39.1%
expm1-udef24.9%
associate-*r*24.9%
sqrt-unprod24.9%
metadata-eval24.9%
metadata-eval24.9%
*-un-lft-identity24.9%
add-sqr-sqrt24.3%
sqrt-prod35.6%
sqrt-prod35.9%
div-inv35.9%
sqrt-div35.6%
sqrt-prod24.3%
add-sqr-sqrt24.9%
Applied egg-rr24.9%
expm1-def39.2%
expm1-log1p48.2%
Simplified48.2%
if 1.8e-142 < t Initial program 38.4%
associate-*l/38.4%
Simplified38.4%
Taylor expanded in t around inf 36.3%
+-commutative36.3%
associate-*r/49.9%
sub-neg49.9%
metadata-eval49.9%
unpow249.9%
+-commutative49.9%
Simplified49.9%
Taylor expanded in t around 0 83.1%
Final simplification77.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ t (- t))) (t_2 (* (sqrt x) (/ t l))))
(if (<= t -1.02e-145)
t_1
(if (<= t -4.1e-197)
t_2
(if (<= t -1.8e-302)
t_1
(if (<= t 1.36e-142) t_2 (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))))))
double code(double x, double l, double t) {
double t_1 = t / -t;
double t_2 = sqrt(x) * (t / l);
double tmp;
if (t <= -1.02e-145) {
tmp = t_1;
} else if (t <= -4.1e-197) {
tmp = t_2;
} else if (t <= -1.8e-302) {
tmp = t_1;
} else if (t <= 1.36e-142) {
tmp = t_2;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / -t
t_2 = sqrt(x) * (t / l)
if (t <= (-1.02d-145)) then
tmp = t_1
else if (t <= (-4.1d-197)) then
tmp = t_2
else if (t <= (-1.8d-302)) then
tmp = t_1
else if (t <= 1.36d-142) then
tmp = t_2
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t / -t;
double t_2 = Math.sqrt(x) * (t / l);
double tmp;
if (t <= -1.02e-145) {
tmp = t_1;
} else if (t <= -4.1e-197) {
tmp = t_2;
} else if (t <= -1.8e-302) {
tmp = t_1;
} else if (t <= 1.36e-142) {
tmp = t_2;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
def code(x, l, t): t_1 = t / -t t_2 = math.sqrt(x) * (t / l) tmp = 0 if t <= -1.02e-145: tmp = t_1 elif t <= -4.1e-197: tmp = t_2 elif t <= -1.8e-302: tmp = t_1 elif t <= 1.36e-142: tmp = t_2 else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
function code(x, l, t) t_1 = Float64(t / Float64(-t)) t_2 = Float64(sqrt(x) * Float64(t / l)) tmp = 0.0 if (t <= -1.02e-145) tmp = t_1; elseif (t <= -4.1e-197) tmp = t_2; elseif (t <= -1.8e-302) tmp = t_1; elseif (t <= 1.36e-142) tmp = t_2; else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t / -t; t_2 = sqrt(x) * (t / l); tmp = 0.0; if (t <= -1.02e-145) tmp = t_1; elseif (t <= -4.1e-197) tmp = t_2; elseif (t <= -1.8e-302) tmp = t_1; elseif (t <= 1.36e-142) tmp = t_2; else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e-145], t$95$1, If[LessEqual[t, -4.1e-197], t$95$2, If[LessEqual[t, -1.8e-302], t$95$1, If[LessEqual[t, 1.36e-142], t$95$2, N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{-t}\\
t_2 := \sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{-142}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.01999999999999993e-145 or -4.1e-197 < t < -1.8e-302Initial program 32.3%
associate-*l/32.3%
Simplified32.3%
*-commutative32.3%
clear-num32.3%
un-div-inv32.3%
sqrt-undiv32.4%
metadata-eval32.4%
sub-neg32.4%
associate-*l/20.6%
sub-neg20.6%
metadata-eval20.6%
Applied egg-rr20.6%
+-commutative20.6%
*-commutative20.6%
+-commutative20.6%
+-commutative20.6%
Simplified20.6%
Taylor expanded in x around inf 37.6%
unpow237.6%
Simplified37.6%
Taylor expanded in t around -inf 79.9%
mul-1-neg79.9%
Simplified79.9%
if -1.01999999999999993e-145 < t < -4.1e-197 or -1.8e-302 < t < 1.35999999999999993e-142Initial program 7.5%
associate-*l/7.5%
Simplified7.5%
*-commutative7.5%
clear-num7.5%
un-div-inv7.5%
sqrt-undiv7.5%
metadata-eval7.5%
sub-neg7.5%
associate-*l/10.5%
sub-neg10.5%
metadata-eval10.5%
Applied egg-rr10.5%
+-commutative10.5%
*-commutative10.5%
+-commutative10.5%
+-commutative10.5%
Simplified10.5%
Taylor expanded in x around inf 68.7%
cancel-sign-sub-inv68.7%
fma-def68.7%
unpow268.7%
fma-def68.7%
unpow268.7%
unpow268.7%
metadata-eval68.7%
unpow268.7%
unpow268.7%
fma-udef68.7%
*-lft-identity68.7%
fma-udef68.7%
unpow268.7%
unpow268.7%
Simplified68.7%
Taylor expanded in l around inf 68.7%
unpow268.7%
Simplified68.7%
Taylor expanded in t around 0 49.0%
if 1.35999999999999993e-142 < t Initial program 38.4%
associate-*l/38.4%
Simplified38.4%
Taylor expanded in t around inf 36.3%
+-commutative36.3%
associate-*r/49.9%
sub-neg49.9%
metadata-eval49.9%
unpow249.9%
+-commutative49.9%
Simplified49.9%
Taylor expanded in x around inf 82.3%
associate--l+82.3%
associate-*r/82.3%
metadata-eval82.3%
unpow282.3%
Simplified82.3%
Final simplification76.7%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ t (- t))) (t_2 (/ t (/ l (sqrt x)))))
(if (<= t -6.6e-104)
t_1
(if (<= t -1.02e-196)
t_2
(if (<= t -1.8e-302)
t_1
(if (<= t 6e-140) t_2 (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))))))
double code(double x, double l, double t) {
double t_1 = t / -t;
double t_2 = t / (l / sqrt(x));
double tmp;
if (t <= -6.6e-104) {
tmp = t_1;
} else if (t <= -1.02e-196) {
tmp = t_2;
} else if (t <= -1.8e-302) {
tmp = t_1;
} else if (t <= 6e-140) {
tmp = t_2;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / -t
t_2 = t / (l / sqrt(x))
if (t <= (-6.6d-104)) then
tmp = t_1
else if (t <= (-1.02d-196)) then
tmp = t_2
else if (t <= (-1.8d-302)) then
tmp = t_1
else if (t <= 6d-140) then
tmp = t_2
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t / -t;
double t_2 = t / (l / Math.sqrt(x));
double tmp;
if (t <= -6.6e-104) {
tmp = t_1;
} else if (t <= -1.02e-196) {
tmp = t_2;
} else if (t <= -1.8e-302) {
tmp = t_1;
} else if (t <= 6e-140) {
tmp = t_2;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
def code(x, l, t): t_1 = t / -t t_2 = t / (l / math.sqrt(x)) tmp = 0 if t <= -6.6e-104: tmp = t_1 elif t <= -1.02e-196: tmp = t_2 elif t <= -1.8e-302: tmp = t_1 elif t <= 6e-140: tmp = t_2 else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
function code(x, l, t) t_1 = Float64(t / Float64(-t)) t_2 = Float64(t / Float64(l / sqrt(x))) tmp = 0.0 if (t <= -6.6e-104) tmp = t_1; elseif (t <= -1.02e-196) tmp = t_2; elseif (t <= -1.8e-302) tmp = t_1; elseif (t <= 6e-140) tmp = t_2; else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t / -t; t_2 = t / (l / sqrt(x)); tmp = 0.0; if (t <= -6.6e-104) tmp = t_1; elseif (t <= -1.02e-196) tmp = t_2; elseif (t <= -1.8e-302) tmp = t_1; elseif (t <= 6e-140) tmp = t_2; else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.6e-104], t$95$1, If[LessEqual[t, -1.02e-196], t$95$2, If[LessEqual[t, -1.8e-302], t$95$1, If[LessEqual[t, 6e-140], t$95$2, N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{-t}\\
t_2 := \frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.02 \cdot 10^{-196}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-140}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -6.60000000000000004e-104 or -1.0200000000000001e-196 < t < -1.8e-302Initial program 32.7%
associate-*l/32.7%
Simplified32.7%
*-commutative32.7%
clear-num32.7%
un-div-inv32.7%
sqrt-undiv32.9%
metadata-eval32.9%
sub-neg32.9%
associate-*l/20.3%
sub-neg20.3%
metadata-eval20.3%
Applied egg-rr20.3%
+-commutative20.3%
*-commutative20.3%
+-commutative20.3%
+-commutative20.3%
Simplified20.3%
Taylor expanded in x around inf 37.1%
unpow237.1%
Simplified37.1%
Taylor expanded in t around -inf 82.0%
mul-1-neg82.0%
Simplified82.0%
if -6.60000000000000004e-104 < t < -1.0200000000000001e-196 or -1.8e-302 < t < 6.00000000000000037e-140Initial program 10.6%
associate-*l/10.6%
Simplified10.6%
*-commutative10.6%
clear-num10.6%
un-div-inv10.6%
sqrt-undiv10.6%
metadata-eval10.6%
sub-neg10.6%
associate-*l/13.2%
sub-neg13.2%
metadata-eval13.2%
Applied egg-rr13.2%
+-commutative13.2%
*-commutative13.2%
+-commutative13.2%
+-commutative13.2%
Simplified13.2%
Taylor expanded in x around inf 67.5%
cancel-sign-sub-inv67.5%
fma-def67.5%
unpow267.5%
fma-def67.5%
unpow267.5%
unpow267.5%
metadata-eval67.5%
unpow267.5%
unpow267.5%
fma-udef67.5%
*-lft-identity67.5%
fma-udef67.5%
unpow267.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 47.9%
associate-*l*47.9%
*-commutative47.9%
associate-*l*48.0%
Simplified48.0%
expm1-log1p-u39.1%
expm1-udef24.9%
associate-*r*24.9%
sqrt-unprod24.9%
metadata-eval24.9%
metadata-eval24.9%
*-un-lft-identity24.9%
add-sqr-sqrt24.3%
sqrt-prod35.6%
sqrt-prod35.9%
div-inv35.9%
sqrt-div35.6%
sqrt-prod24.3%
add-sqr-sqrt24.9%
Applied egg-rr24.9%
expm1-def39.2%
expm1-log1p48.2%
Simplified48.2%
if 6.00000000000000037e-140 < t Initial program 38.4%
associate-*l/38.4%
Simplified38.4%
Taylor expanded in t around inf 36.3%
+-commutative36.3%
associate-*r/49.9%
sub-neg49.9%
metadata-eval49.9%
unpow249.9%
+-commutative49.9%
Simplified49.9%
Taylor expanded in x around inf 82.3%
associate--l+82.3%
associate-*r/82.3%
metadata-eval82.3%
unpow282.3%
Simplified82.3%
Final simplification76.7%
(FPCore (x l t) :precision binary64 (if (<= t -2e-310) (/ t (- t)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = t / -t;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2d-310)) then
tmp = t / -t
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = t / -t;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-310: tmp = t / -t else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-310) tmp = Float64(t / Float64(-t)); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-310) tmp = t / -t; else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.999999999999994e-310Initial program 30.5%
associate-*l/30.5%
Simplified30.5%
*-commutative30.5%
clear-num30.5%
un-div-inv30.5%
sqrt-undiv30.6%
metadata-eval30.6%
sub-neg30.6%
associate-*l/19.8%
sub-neg19.8%
metadata-eval19.8%
Applied egg-rr19.8%
+-commutative19.8%
*-commutative19.8%
+-commutative19.8%
+-commutative19.8%
Simplified19.8%
Taylor expanded in x around inf 35.5%
unpow235.5%
Simplified35.5%
Taylor expanded in t around -inf 74.3%
mul-1-neg74.3%
Simplified74.3%
if -1.999999999999994e-310 < t Initial program 32.4%
associate-*l/32.4%
Simplified32.4%
Taylor expanded in t around inf 30.8%
+-commutative30.8%
associate-*r/41.8%
sub-neg41.8%
metadata-eval41.8%
unpow241.8%
+-commutative41.8%
Simplified41.8%
Taylor expanded in x around inf 71.6%
associate--l+71.6%
associate-*r/71.6%
metadata-eval71.6%
unpow271.6%
Simplified71.6%
Final simplification73.0%
(FPCore (x l t) :precision binary64 (if (<= t -2e-310) (/ t (- t)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = t / -t;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2d-310)) then
tmp = t / -t
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = t / -t;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-310: tmp = t / -t else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-310) tmp = Float64(t / Float64(-t)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-310) tmp = t / -t; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.999999999999994e-310Initial program 30.5%
associate-*l/30.5%
Simplified30.5%
*-commutative30.5%
clear-num30.5%
un-div-inv30.5%
sqrt-undiv30.6%
metadata-eval30.6%
sub-neg30.6%
associate-*l/19.8%
sub-neg19.8%
metadata-eval19.8%
Applied egg-rr19.8%
+-commutative19.8%
*-commutative19.8%
+-commutative19.8%
+-commutative19.8%
Simplified19.8%
Taylor expanded in x around inf 35.5%
unpow235.5%
Simplified35.5%
Taylor expanded in t around -inf 74.3%
mul-1-neg74.3%
Simplified74.3%
if -1.999999999999994e-310 < t Initial program 32.4%
associate-*l/32.4%
Simplified32.4%
Taylor expanded in t around inf 30.8%
+-commutative30.8%
associate-*r/41.8%
sub-neg41.8%
metadata-eval41.8%
unpow241.8%
+-commutative41.8%
Simplified41.8%
Taylor expanded in x around inf 71.4%
Final simplification72.9%
(FPCore (x l t) :precision binary64 (if (<= t -2e-310) (/ t (- t)) 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = t / -t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2d-310)) then
tmp = t / -t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = t / -t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-310: tmp = t / -t else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-310) tmp = Float64(t / Float64(-t)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-310) tmp = t / -t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(t / (-t)), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.999999999999994e-310Initial program 30.5%
associate-*l/30.5%
Simplified30.5%
*-commutative30.5%
clear-num30.5%
un-div-inv30.5%
sqrt-undiv30.6%
metadata-eval30.6%
sub-neg30.6%
associate-*l/19.8%
sub-neg19.8%
metadata-eval19.8%
Applied egg-rr19.8%
+-commutative19.8%
*-commutative19.8%
+-commutative19.8%
+-commutative19.8%
Simplified19.8%
Taylor expanded in x around inf 35.5%
unpow235.5%
Simplified35.5%
Taylor expanded in t around -inf 74.3%
mul-1-neg74.3%
Simplified74.3%
if -1.999999999999994e-310 < t Initial program 32.4%
associate-*l/32.4%
Simplified32.4%
Taylor expanded in t around inf 30.8%
+-commutative30.8%
associate-*r/41.8%
sub-neg41.8%
metadata-eval41.8%
unpow241.8%
+-commutative41.8%
Simplified41.8%
Taylor expanded in x around inf 70.8%
Final simplification72.7%
(FPCore (x l t) :precision binary64 1.0)
double code(double x, double l, double t) {
return 1.0;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double l, double t) {
return 1.0;
}
def code(x, l, t): return 1.0
function code(x, l, t) return 1.0 end
function tmp = code(x, l, t) tmp = 1.0; end
code[x_, l_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 31.4%
associate-*l/31.4%
Simplified31.4%
Taylor expanded in t around inf 26.7%
+-commutative26.7%
associate-*r/38.8%
sub-neg38.8%
metadata-eval38.8%
unpow238.8%
+-commutative38.8%
Simplified38.8%
Taylor expanded in x around inf 35.0%
Final simplification35.0%
herbie shell --seed 2023292
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))