
(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 10 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 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -4.6e-74)
(- t_1)
(if (<= t 2.45e-5)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma (* t 2.0) t (* l l)) x))))))
t_1))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.6e-74) {
tmp = -t_1;
} else if (t <= 2.45e-5) {
tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((t * 2.0), t, (l * l)) / x)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -4.6e-74) tmp = Float64(-t_1); elseif (t <= 2.45e-5) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(t * 2.0), t, Float64(l * l)) / x)))))); else tmp = t_1; end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.6e-74], (-t$95$1), If[LessEqual[t, 2.45e-5], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * 2.0), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{-74}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-5}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.59999999999999961e-74Initial program 37.2%
associate-*r/37.2%
fma-neg37.2%
sub-neg37.2%
metadata-eval37.2%
+-commutative37.2%
fma-def37.2%
distribute-rgt-neg-in37.2%
Simplified37.2%
associate-*r/37.2%
metadata-eval37.2%
sub-neg37.2%
fma-udef37.2%
+-commutative37.2%
distribute-rgt-neg-out37.2%
fma-neg37.2%
*-commutative37.2%
fma-neg37.2%
Applied egg-rr82.4%
Taylor expanded in t around -inf 90.2%
mul-1-neg90.2%
sub-neg90.2%
metadata-eval90.2%
Simplified90.2%
if -4.59999999999999961e-74 < t < 2.45e-5Initial program 20.6%
associate-*l/20.7%
Simplified20.7%
Taylor expanded in x around inf 68.9%
associate--l+68.9%
unpow268.9%
distribute-lft-out68.9%
unpow268.9%
unpow268.9%
associate-*r/68.9%
mul-1-neg68.9%
+-commutative68.9%
unpow268.9%
associate-*l*68.9%
unpow268.9%
fma-udef68.9%
Simplified68.9%
if 2.45e-5 < t Initial program 37.8%
associate-*r/37.7%
fma-neg37.7%
sub-neg37.7%
metadata-eval37.7%
+-commutative37.7%
fma-def37.7%
distribute-rgt-neg-in37.7%
Simplified37.7%
associate-*r/37.8%
metadata-eval37.8%
sub-neg37.8%
fma-udef37.8%
+-commutative37.8%
distribute-rgt-neg-out37.8%
fma-neg37.8%
*-commutative37.8%
fma-neg37.8%
Applied egg-rr83.1%
Taylor expanded in t around inf 93.3%
Final simplification84.1%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -1.5e-103)
(- t_1)
(if (<= t 6.6e-183) (/ (sqrt 2.0) (/ (/ (hypot l l) (sqrt x)) t)) t_1))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1.5e-103) {
tmp = -t_1;
} else if (t <= 6.6e-183) {
tmp = sqrt(2.0) / ((hypot(l, l) / sqrt(x)) / t);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1.5e-103) {
tmp = -t_1;
} else if (t <= 6.6e-183) {
tmp = Math.sqrt(2.0) / ((Math.hypot(l, l) / Math.sqrt(x)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -1.5e-103: tmp = -t_1 elif t <= 6.6e-183: tmp = math.sqrt(2.0) / ((math.hypot(l, l) / math.sqrt(x)) / t) else: tmp = t_1 return tmp
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1.5e-103) tmp = Float64(-t_1); elseif (t <= 6.6e-183) tmp = Float64(sqrt(2.0) / Float64(Float64(hypot(l, l) / sqrt(x)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -1.5e-103) tmp = -t_1; elseif (t <= 6.6e-183) tmp = sqrt(2.0) / ((hypot(l, l) / sqrt(x)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.5e-103], (-t$95$1), If[LessEqual[t, 6.6e-183], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Sqrt[l ^ 2 + l ^ 2], $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-103}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-183}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\frac{\mathsf{hypot}\left(\ell, \ell\right)}{\sqrt{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.5e-103Initial program 38.0%
associate-*r/38.0%
fma-neg38.0%
sub-neg38.0%
metadata-eval38.0%
+-commutative38.0%
fma-def38.0%
distribute-rgt-neg-in38.0%
Simplified38.0%
associate-*r/38.0%
metadata-eval38.0%
sub-neg38.0%
fma-udef38.0%
+-commutative38.0%
distribute-rgt-neg-out38.0%
fma-neg38.0%
*-commutative38.0%
fma-neg38.0%
Applied egg-rr82.1%
Taylor expanded in t around -inf 89.5%
mul-1-neg89.5%
sub-neg89.5%
metadata-eval89.5%
Simplified89.5%
if -1.5e-103 < t < 6.5999999999999999e-183Initial program 11.3%
associate-/l*11.4%
fma-neg11.4%
remove-double-neg11.4%
fma-neg11.4%
sub-neg11.4%
metadata-eval11.4%
remove-double-neg11.4%
fma-def11.4%
Simplified11.4%
Taylor expanded in t around 0 5.1%
associate-*l/5.1%
*-lft-identity5.1%
*-commutative5.1%
unpow25.1%
+-commutative5.1%
sub-neg5.1%
metadata-eval5.1%
+-commutative5.1%
unpow25.1%
Simplified5.1%
Taylor expanded in x around inf 49.5%
unpow249.5%
neg-mul-149.5%
unpow249.5%
Simplified49.5%
sqrt-div53.7%
fma-neg53.7%
add-sqr-sqrt0.3%
sqrt-unprod3.5%
sqr-neg3.5%
sqrt-unprod3.0%
add-sqr-sqrt3.0%
add-sqr-sqrt0.3%
sqrt-unprod37.8%
sqr-neg37.8%
sqrt-unprod53.7%
add-sqr-sqrt53.7%
Applied egg-rr53.7%
fma-udef53.7%
hypot-def57.3%
Simplified57.3%
if 6.5999999999999999e-183 < t Initial program 37.4%
associate-*r/37.2%
fma-neg37.2%
sub-neg37.2%
metadata-eval37.2%
+-commutative37.2%
fma-def37.2%
distribute-rgt-neg-in37.2%
Simplified37.2%
associate-*r/37.4%
metadata-eval37.4%
sub-neg37.4%
fma-udef37.4%
+-commutative37.4%
distribute-rgt-neg-out37.4%
fma-neg37.4%
*-commutative37.4%
fma-neg37.4%
Applied egg-rr72.8%
Taylor expanded in t around inf 86.6%
Final simplification81.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.95e-226)
(- t_1)
(if (<= t 1.85e-268)
(/ (sqrt 2.0) (/ (sqrt (/ (+ (* l l) (* l l)) x)) t))
t_1))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.95e-226) {
tmp = -t_1;
} else if (t <= 1.85e-268) {
tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t);
} else {
tmp = t_1;
}
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) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-2.95d-226)) then
tmp = -t_1
else if (t <= 1.85d-268) then
tmp = sqrt(2.0d0) / (sqrt((((l * l) + (l * l)) / x)) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.95e-226) {
tmp = -t_1;
} else if (t <= 1.85e-268) {
tmp = Math.sqrt(2.0) / (Math.sqrt((((l * l) + (l * l)) / x)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -2.95e-226: tmp = -t_1 elif t <= 1.85e-268: tmp = math.sqrt(2.0) / (math.sqrt((((l * l) + (l * l)) / x)) / t) else: tmp = t_1 return tmp
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.95e-226) tmp = Float64(-t_1); elseif (t <= 1.85e-268) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(l * l) + Float64(l * l)) / x)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -2.95e-226) tmp = -t_1; elseif (t <= 1.85e-268) tmp = sqrt(2.0) / (sqrt((((l * l) + (l * l)) / x)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.95e-226], (-t$95$1), If[LessEqual[t, 1.85e-268], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.95 \cdot 10^{-226}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-268}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\frac{\ell \cdot \ell + \ell \cdot \ell}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.95e-226Initial program 34.6%
associate-*r/34.6%
fma-neg34.6%
sub-neg34.6%
metadata-eval34.6%
+-commutative34.6%
fma-def34.6%
distribute-rgt-neg-in34.6%
Simplified34.6%
associate-*r/34.6%
metadata-eval34.6%
sub-neg34.6%
fma-udef34.6%
+-commutative34.6%
distribute-rgt-neg-out34.6%
fma-neg34.6%
*-commutative34.6%
fma-neg34.6%
Applied egg-rr74.1%
Taylor expanded in t around -inf 81.2%
mul-1-neg81.2%
sub-neg81.2%
metadata-eval81.2%
Simplified81.2%
if -2.95e-226 < t < 1.85000000000000009e-268Initial program 3.5%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
fma-neg3.5%
sub-neg3.5%
metadata-eval3.5%
remove-double-neg3.5%
fma-def3.5%
Simplified3.5%
Taylor expanded in t around 0 4.3%
associate-*l/4.3%
*-lft-identity4.3%
*-commutative4.3%
unpow24.3%
+-commutative4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 73.3%
unpow273.3%
neg-mul-173.3%
unpow273.3%
Simplified73.3%
if 1.85000000000000009e-268 < t Initial program 32.6%
associate-*r/32.5%
fma-neg32.5%
sub-neg32.5%
metadata-eval32.5%
+-commutative32.5%
fma-def32.5%
distribute-rgt-neg-in32.5%
Simplified32.5%
associate-*r/32.6%
metadata-eval32.6%
sub-neg32.6%
fma-udef32.6%
+-commutative32.6%
distribute-rgt-neg-out32.6%
fma-neg32.6%
*-commutative32.6%
fma-neg32.6%
Applied egg-rr66.4%
Taylor expanded in t around inf 80.8%
Final simplification80.6%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -4.5e-226)
(- t_1)
(if (<= t 2.3e-268) (* t (sqrt (* x (/ 2.0 (fma l l (* l l)))))) t_1))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.5e-226) {
tmp = -t_1;
} else if (t <= 2.3e-268) {
tmp = t * sqrt((x * (2.0 / fma(l, l, (l * l)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -4.5e-226) tmp = Float64(-t_1); elseif (t <= 2.3e-268) tmp = Float64(t * sqrt(Float64(x * Float64(2.0 / fma(l, l, Float64(l * l)))))); else tmp = t_1; end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.5e-226], (-t$95$1), If[LessEqual[t, 2.3e-268], N[(t * N[Sqrt[N[(x * N[(2.0 / N[(l * l + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-226}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-268}:\\
\;\;\;\;t \cdot \sqrt{x \cdot \frac{2}{\mathsf{fma}\left(\ell, \ell, \ell \cdot \ell\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.50000000000000011e-226Initial program 34.6%
associate-*r/34.6%
fma-neg34.6%
sub-neg34.6%
metadata-eval34.6%
+-commutative34.6%
fma-def34.6%
distribute-rgt-neg-in34.6%
Simplified34.6%
associate-*r/34.6%
metadata-eval34.6%
sub-neg34.6%
fma-udef34.6%
+-commutative34.6%
distribute-rgt-neg-out34.6%
fma-neg34.6%
*-commutative34.6%
fma-neg34.6%
Applied egg-rr74.1%
Taylor expanded in t around -inf 81.2%
mul-1-neg81.2%
sub-neg81.2%
metadata-eval81.2%
Simplified81.2%
if -4.50000000000000011e-226 < t < 2.3000000000000001e-268Initial program 3.5%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
fma-neg3.5%
sub-neg3.5%
metadata-eval3.5%
remove-double-neg3.5%
fma-def3.5%
Simplified3.5%
Taylor expanded in t around 0 4.3%
associate-*l/4.3%
*-lft-identity4.3%
*-commutative4.3%
unpow24.3%
+-commutative4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 73.3%
unpow273.3%
neg-mul-173.3%
unpow273.3%
Simplified73.3%
expm1-log1p-u73.1%
expm1-udef39.1%
Applied egg-rr38.9%
expm1-def69.4%
expm1-log1p69.6%
*-commutative69.6%
associate-/r/69.6%
Simplified69.6%
if 2.3000000000000001e-268 < t Initial program 32.6%
associate-*r/32.5%
fma-neg32.5%
sub-neg32.5%
metadata-eval32.5%
+-commutative32.5%
fma-def32.5%
distribute-rgt-neg-in32.5%
Simplified32.5%
associate-*r/32.6%
metadata-eval32.6%
sub-neg32.6%
fma-udef32.6%
+-commutative32.6%
distribute-rgt-neg-out32.6%
fma-neg32.6%
*-commutative32.6%
fma-neg32.6%
Applied egg-rr66.4%
Taylor expanded in t around inf 80.8%
Final simplification80.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -5e-227)
(- t_1)
(if (<= t 4.4e-270)
(/ (sqrt 2.0) (/ (sqrt (* 2.0 (/ l (/ x l)))) t))
t_1))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -5e-227) {
tmp = -t_1;
} else if (t <= 4.4e-270) {
tmp = sqrt(2.0) / (sqrt((2.0 * (l / (x / l)))) / t);
} else {
tmp = t_1;
}
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) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-5d-227)) then
tmp = -t_1
else if (t <= 4.4d-270) then
tmp = sqrt(2.0d0) / (sqrt((2.0d0 * (l / (x / l)))) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -5e-227) {
tmp = -t_1;
} else if (t <= 4.4e-270) {
tmp = Math.sqrt(2.0) / (Math.sqrt((2.0 * (l / (x / l)))) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -5e-227: tmp = -t_1 elif t <= 4.4e-270: tmp = math.sqrt(2.0) / (math.sqrt((2.0 * (l / (x / l)))) / t) else: tmp = t_1 return tmp
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -5e-227) tmp = Float64(-t_1); elseif (t <= 4.4e-270) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(2.0 * Float64(l / Float64(x / l)))) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -5e-227) tmp = -t_1; elseif (t <= 4.4e-270) tmp = sqrt(2.0) / (sqrt((2.0 * (l / (x / l)))) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -5e-227], (-t$95$1), If[LessEqual[t, 4.4e-270], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(2.0 * N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-227}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-270}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{2 \cdot \frac{\ell}{\frac{x}{\ell}}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.99999999999999961e-227Initial program 34.6%
associate-*r/34.6%
fma-neg34.6%
sub-neg34.6%
metadata-eval34.6%
+-commutative34.6%
fma-def34.6%
distribute-rgt-neg-in34.6%
Simplified34.6%
associate-*r/34.6%
metadata-eval34.6%
sub-neg34.6%
fma-udef34.6%
+-commutative34.6%
distribute-rgt-neg-out34.6%
fma-neg34.6%
*-commutative34.6%
fma-neg34.6%
Applied egg-rr74.1%
Taylor expanded in t around -inf 81.2%
mul-1-neg81.2%
sub-neg81.2%
metadata-eval81.2%
Simplified81.2%
if -4.99999999999999961e-227 < t < 4.3999999999999997e-270Initial program 3.5%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
fma-neg3.5%
sub-neg3.5%
metadata-eval3.5%
remove-double-neg3.5%
fma-def3.5%
Simplified3.5%
Taylor expanded in t around 0 4.3%
associate-*l/4.3%
*-lft-identity4.3%
*-commutative4.3%
unpow24.3%
+-commutative4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 73.3%
unpow273.3%
neg-mul-173.3%
unpow273.3%
Simplified73.3%
Taylor expanded in l around 0 73.1%
unpow273.1%
associate-/l*73.1%
Simplified73.1%
if 4.3999999999999997e-270 < t Initial program 32.6%
associate-*r/32.5%
fma-neg32.5%
sub-neg32.5%
metadata-eval32.5%
+-commutative32.5%
fma-def32.5%
distribute-rgt-neg-in32.5%
Simplified32.5%
associate-*r/32.6%
metadata-eval32.6%
sub-neg32.6%
fma-udef32.6%
+-commutative32.6%
distribute-rgt-neg-out32.6%
fma-neg32.6%
*-commutative32.6%
fma-neg32.6%
Applied egg-rr66.4%
Taylor expanded in t around inf 80.8%
Final simplification80.6%
(FPCore (x l t)
:precision binary64
(if (<= t -1.45e-226)
-1.0
(if (<= t 6.8e-270)
(* (sqrt x) (/ (- t) l))
(sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.45e-226) {
tmp = -1.0;
} else if (t <= 6.8e-270) {
tmp = sqrt(x) * (-t / l);
} 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) :: tmp
if (t <= (-1.45d-226)) then
tmp = -1.0d0
else if (t <= 6.8d-270) then
tmp = sqrt(x) * (-t / l)
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 tmp;
if (t <= -1.45e-226) {
tmp = -1.0;
} else if (t <= 6.8e-270) {
tmp = Math.sqrt(x) * (-t / l);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.45e-226: tmp = -1.0 elif t <= 6.8e-270: tmp = math.sqrt(x) * (-t / l) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.45e-226) tmp = -1.0; elseif (t <= 6.8e-270) tmp = Float64(sqrt(x) * Float64(Float64(-t) / l)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.45e-226) tmp = -1.0; elseif (t <= 6.8e-270) tmp = sqrt(x) * (-t / l); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.45e-226], -1.0, If[LessEqual[t, 6.8e-270], N[(N[Sqrt[x], $MachinePrecision] * N[((-t) / l), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-226}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-270}:\\
\;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.45000000000000001e-226Initial program 34.6%
associate-*r/34.6%
fma-neg34.6%
sub-neg34.6%
metadata-eval34.6%
+-commutative34.6%
fma-def34.6%
distribute-rgt-neg-in34.6%
Simplified34.6%
fma-udef34.6%
fma-udef34.6%
+-commutative34.6%
*-commutative34.6%
clear-num34.6%
metadata-eval34.6%
sub-neg34.6%
un-div-inv34.6%
+-commutative34.6%
associate-*r*34.6%
fma-def34.6%
sub-neg34.6%
metadata-eval34.6%
add-sqr-sqrt15.6%
sqrt-unprod36.5%
Applied egg-rr37.4%
Taylor expanded in x around inf 35.7%
distribute-lft-out35.7%
unpow235.7%
unpow235.7%
Simplified35.7%
Taylor expanded in t around -inf 79.3%
if -1.45000000000000001e-226 < t < 6.8000000000000001e-270Initial program 3.5%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
fma-neg3.5%
sub-neg3.5%
metadata-eval3.5%
remove-double-neg3.5%
fma-def3.5%
Simplified3.5%
Taylor expanded in t around 0 4.3%
associate-*l/4.3%
*-lft-identity4.3%
*-commutative4.3%
unpow24.3%
+-commutative4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 73.3%
unpow273.3%
neg-mul-173.3%
unpow273.3%
Simplified73.3%
Taylor expanded in l around -inf 63.6%
mul-1-neg63.6%
*-commutative63.6%
distribute-rgt-neg-in63.6%
Simplified63.6%
if 6.8000000000000001e-270 < t Initial program 32.6%
associate-*r/32.5%
fma-neg32.5%
sub-neg32.5%
metadata-eval32.5%
+-commutative32.5%
fma-def32.5%
distribute-rgt-neg-in32.5%
Simplified32.5%
associate-*r/32.6%
metadata-eval32.6%
sub-neg32.6%
fma-udef32.6%
+-commutative32.6%
distribute-rgt-neg-out32.6%
fma-neg32.6%
*-commutative32.6%
fma-neg32.6%
Applied egg-rr66.4%
Taylor expanded in t around inf 80.8%
Final simplification79.0%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -4.1e-227)
(- t_1)
(if (<= t 2.25e-268) (* (sqrt x) (/ (- t) l)) t_1))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.1e-227) {
tmp = -t_1;
} else if (t <= 2.25e-268) {
tmp = sqrt(x) * (-t / l);
} else {
tmp = t_1;
}
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) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-4.1d-227)) then
tmp = -t_1
else if (t <= 2.25d-268) then
tmp = sqrt(x) * (-t / l)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.1e-227) {
tmp = -t_1;
} else if (t <= 2.25e-268) {
tmp = Math.sqrt(x) * (-t / l);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -4.1e-227: tmp = -t_1 elif t <= 2.25e-268: tmp = math.sqrt(x) * (-t / l) else: tmp = t_1 return tmp
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -4.1e-227) tmp = Float64(-t_1); elseif (t <= 2.25e-268) tmp = Float64(sqrt(x) * Float64(Float64(-t) / l)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -4.1e-227) tmp = -t_1; elseif (t <= 2.25e-268) tmp = sqrt(x) * (-t / l); else tmp = t_1; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.1e-227], (-t$95$1), If[LessEqual[t, 2.25e-268], N[(N[Sqrt[x], $MachinePrecision] * N[((-t) / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{-227}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-268}:\\
\;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.10000000000000009e-227Initial program 34.6%
associate-*r/34.6%
fma-neg34.6%
sub-neg34.6%
metadata-eval34.6%
+-commutative34.6%
fma-def34.6%
distribute-rgt-neg-in34.6%
Simplified34.6%
associate-*r/34.6%
metadata-eval34.6%
sub-neg34.6%
fma-udef34.6%
+-commutative34.6%
distribute-rgt-neg-out34.6%
fma-neg34.6%
*-commutative34.6%
fma-neg34.6%
Applied egg-rr74.1%
Taylor expanded in t around -inf 81.2%
mul-1-neg81.2%
sub-neg81.2%
metadata-eval81.2%
Simplified81.2%
if -4.10000000000000009e-227 < t < 2.2500000000000001e-268Initial program 3.5%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
fma-neg3.5%
sub-neg3.5%
metadata-eval3.5%
remove-double-neg3.5%
fma-def3.5%
Simplified3.5%
Taylor expanded in t around 0 4.3%
associate-*l/4.3%
*-lft-identity4.3%
*-commutative4.3%
unpow24.3%
+-commutative4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 73.3%
unpow273.3%
neg-mul-173.3%
unpow273.3%
Simplified73.3%
Taylor expanded in l around -inf 63.6%
mul-1-neg63.6%
*-commutative63.6%
distribute-rgt-neg-in63.6%
Simplified63.6%
if 2.2500000000000001e-268 < t Initial program 32.6%
associate-*r/32.5%
fma-neg32.5%
sub-neg32.5%
metadata-eval32.5%
+-commutative32.5%
fma-def32.5%
distribute-rgt-neg-in32.5%
Simplified32.5%
associate-*r/32.6%
metadata-eval32.6%
sub-neg32.6%
fma-udef32.6%
+-commutative32.6%
distribute-rgt-neg-out32.6%
fma-neg32.6%
*-commutative32.6%
fma-neg32.6%
Applied egg-rr66.4%
Taylor expanded in t around inf 80.8%
Final simplification80.0%
(FPCore (x l t) :precision binary64 (if (<= t -2.7e-227) -1.0 (if (<= t 8.8e-269) (* (sqrt x) (/ (- t) l)) 1.0)))
double code(double x, double l, double t) {
double tmp;
if (t <= -2.7e-227) {
tmp = -1.0;
} else if (t <= 8.8e-269) {
tmp = sqrt(x) * (-t / l);
} 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 <= (-2.7d-227)) then
tmp = -1.0d0
else if (t <= 8.8d-269) then
tmp = sqrt(x) * (-t / l)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.7e-227) {
tmp = -1.0;
} else if (t <= 8.8e-269) {
tmp = Math.sqrt(x) * (-t / l);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2.7e-227: tmp = -1.0 elif t <= 8.8e-269: tmp = math.sqrt(x) * (-t / l) else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2.7e-227) tmp = -1.0; elseif (t <= 8.8e-269) tmp = Float64(sqrt(x) * Float64(Float64(-t) / l)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.7e-227) tmp = -1.0; elseif (t <= 8.8e-269) tmp = sqrt(x) * (-t / l); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2.7e-227], -1.0, If[LessEqual[t, 8.8e-269], N[(N[Sqrt[x], $MachinePrecision] * N[((-t) / l), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-227}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-269}:\\
\;\;\;\;\sqrt{x} \cdot \frac{-t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -2.7e-227Initial program 34.6%
associate-*r/34.6%
fma-neg34.6%
sub-neg34.6%
metadata-eval34.6%
+-commutative34.6%
fma-def34.6%
distribute-rgt-neg-in34.6%
Simplified34.6%
fma-udef34.6%
fma-udef34.6%
+-commutative34.6%
*-commutative34.6%
clear-num34.6%
metadata-eval34.6%
sub-neg34.6%
un-div-inv34.6%
+-commutative34.6%
associate-*r*34.6%
fma-def34.6%
sub-neg34.6%
metadata-eval34.6%
add-sqr-sqrt15.6%
sqrt-unprod36.5%
Applied egg-rr37.4%
Taylor expanded in x around inf 35.7%
distribute-lft-out35.7%
unpow235.7%
unpow235.7%
Simplified35.7%
Taylor expanded in t around -inf 79.3%
if -2.7e-227 < t < 8.79999999999999936e-269Initial program 3.5%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
fma-neg3.5%
sub-neg3.5%
metadata-eval3.5%
remove-double-neg3.5%
fma-def3.5%
Simplified3.5%
Taylor expanded in t around 0 4.3%
associate-*l/4.3%
*-lft-identity4.3%
*-commutative4.3%
unpow24.3%
+-commutative4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 73.3%
unpow273.3%
neg-mul-173.3%
unpow273.3%
Simplified73.3%
Taylor expanded in l around -inf 63.6%
mul-1-neg63.6%
*-commutative63.6%
distribute-rgt-neg-in63.6%
Simplified63.6%
if 8.79999999999999936e-269 < t Initial program 32.6%
associate-*r/32.5%
fma-neg32.5%
sub-neg32.5%
metadata-eval32.5%
+-commutative32.5%
fma-def32.5%
distribute-rgt-neg-in32.5%
Simplified32.5%
fma-udef32.5%
fma-udef32.5%
+-commutative32.5%
*-commutative32.5%
clear-num32.5%
metadata-eval32.5%
sub-neg32.5%
un-div-inv32.5%
+-commutative32.5%
associate-*r*32.5%
fma-def32.5%
sub-neg32.5%
metadata-eval32.5%
add-sqr-sqrt15.4%
sqrt-unprod31.6%
Applied egg-rr33.7%
Taylor expanded in x around inf 33.0%
distribute-lft-out33.0%
unpow233.0%
unpow233.0%
Simplified33.0%
Taylor expanded in t around inf 79.6%
Final simplification78.5%
(FPCore (x l t) :precision binary64 (if (<= t -1.02e-302) -1.0 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.02e-302) {
tmp = -1.0;
} 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 <= (-1.02d-302)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.02e-302) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.02e-302: tmp = -1.0 else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.02e-302) tmp = -1.0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.02e-302) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.02e-302], -1.0, 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{-302}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.02e-302Initial program 32.1%
associate-*r/32.0%
fma-neg32.0%
sub-neg32.0%
metadata-eval32.0%
+-commutative32.0%
fma-def32.0%
distribute-rgt-neg-in32.0%
Simplified32.0%
fma-udef32.0%
fma-udef32.0%
+-commutative32.0%
*-commutative32.0%
clear-num32.0%
metadata-eval32.0%
sub-neg32.0%
un-div-inv32.0%
+-commutative32.0%
associate-*r*32.0%
fma-def32.0%
sub-neg32.0%
metadata-eval32.0%
add-sqr-sqrt14.3%
sqrt-unprod36.2%
Applied egg-rr37.0%
Taylor expanded in x around inf 35.5%
distribute-lft-out35.5%
unpow235.5%
unpow235.5%
Simplified35.5%
Taylor expanded in t around -inf 74.9%
if -1.02e-302 < t Initial program 31.8%
associate-*r/31.7%
fma-neg31.7%
sub-neg31.7%
metadata-eval31.7%
+-commutative31.7%
fma-def31.7%
distribute-rgt-neg-in31.7%
Simplified31.7%
fma-udef31.7%
fma-udef31.7%
+-commutative31.7%
*-commutative31.7%
clear-num31.7%
metadata-eval31.7%
sub-neg31.7%
un-div-inv31.7%
+-commutative31.7%
associate-*r*31.7%
fma-def31.7%
sub-neg31.7%
metadata-eval31.7%
add-sqr-sqrt15.0%
sqrt-unprod32.6%
Applied egg-rr34.6%
Taylor expanded in x around inf 34.0%
distribute-lft-out34.0%
unpow234.0%
unpow234.0%
Simplified34.0%
Taylor expanded in t around inf 77.6%
Final simplification76.1%
(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.9%
associate-*r/31.9%
fma-neg31.9%
sub-neg31.9%
metadata-eval31.9%
+-commutative31.9%
fma-def31.9%
distribute-rgt-neg-in31.9%
Simplified31.9%
fma-udef31.9%
fma-udef31.9%
+-commutative31.9%
*-commutative31.9%
clear-num31.9%
metadata-eval31.9%
sub-neg31.9%
un-div-inv31.9%
+-commutative31.9%
associate-*r*31.9%
fma-def31.9%
sub-neg31.9%
metadata-eval31.9%
add-sqr-sqrt14.6%
sqrt-unprod34.6%
Applied egg-rr36.0%
Taylor expanded in x around inf 34.8%
distribute-lft-out34.8%
unpow234.8%
unpow234.8%
Simplified34.8%
Taylor expanded in t around -inf 42.6%
Final simplification42.6%
herbie shell --seed 2023172
(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)))))