
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -2e-219)
t_1
(if (<= t_2 2e-284) (fma t (/ (* x (- y a)) (* z t)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / (a - z)), x);
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -2e-219) {
tmp = t_1;
} else if (t_2 <= 2e-284) {
tmp = fma(t, ((x * (y - a)) / (z * t)), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -2e-219) tmp = t_1; elseif (t_2 <= 2e-284) tmp = fma(t, Float64(Float64(x * Float64(y - a)) / Float64(z * t)), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-219], t$95$1, If[LessEqual[t$95$2, 2e-284], N[(t * N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-284}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x \cdot \left(y - a\right)}{z \cdot t}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.0000000000000001e-219 or 2.00000000000000007e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6488.7
Applied egg-rr88.7%
if -2.0000000000000001e-219 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000007e-284Initial program 6.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified96.6%
Taylor expanded in x around inf
Simplified96.6%
*-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
un-div-invN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.6
Applied egg-rr99.6%
Taylor expanded in t around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64100.0
Simplified100.0%
Final simplification89.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -2e-219)
t_1
(if (<= t_2 2e-284) (/ (fma (- y a) (- x t) (* z t)) z) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / (a - z)), x);
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -2e-219) {
tmp = t_1;
} else if (t_2 <= 2e-284) {
tmp = fma((y - a), (x - t), (z * t)) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -2e-219) tmp = t_1; elseif (t_2 <= 2e-284) tmp = Float64(fma(Float64(y - a), Float64(x - t), Float64(z * t)) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-219], t$95$1, If[LessEqual[t$95$2, 2e-284], N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-284}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y - a, x - t, z \cdot t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.0000000000000001e-219 or 2.00000000000000007e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6488.7
Applied egg-rr88.7%
if -2.0000000000000001e-219 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000007e-284Initial program 6.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified96.6%
Taylor expanded in z around 0
/-lowering-/.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -2e-219)
t_1
(if (<= t_2 2e-284) (fma (/ 1.0 z) (* x (- y a)) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / (a - z)), x);
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -2e-219) {
tmp = t_1;
} else if (t_2 <= 2e-284) {
tmp = fma((1.0 / z), (x * (y - a)), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -2e-219) tmp = t_1; elseif (t_2 <= 2e-284) tmp = fma(Float64(1.0 / z), Float64(x * Float64(y - a)), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-219], t$95$1, If[LessEqual[t$95$2, 2e-284], N[(N[(1.0 / z), $MachinePrecision] * N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-284}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{z}, x \cdot \left(y - a\right), t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.0000000000000001e-219 or 2.00000000000000007e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6488.7
Applied egg-rr88.7%
if -2.0000000000000001e-219 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000007e-284Initial program 6.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified96.6%
Taylor expanded in x around inf
Simplified96.6%
*-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
un-div-invN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.6
Applied egg-rr99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma x (/ (- y a) z) t)))
(if (<= z -7.8e+19)
t_1
(if (<= z -3.3e-267)
(* t (/ y (- a z)))
(if (<= z 5.4e-99) x (if (<= z 3.2e+57) (* y (/ t (- a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, ((y - a) / z), t);
double tmp;
if (z <= -7.8e+19) {
tmp = t_1;
} else if (z <= -3.3e-267) {
tmp = t * (y / (a - z));
} else if (z <= 5.4e-99) {
tmp = x;
} else if (z <= 3.2e+57) {
tmp = y * (t / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -7.8e+19) tmp = t_1; elseif (z <= -3.3e-267) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 5.4e-99) tmp = x; elseif (z <= 3.2e+57) tmp = Float64(y * Float64(t / Float64(a - z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.8e+19], t$95$1, If[LessEqual[z, -3.3e-267], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-99], x, If[LessEqual[z, 3.2e+57], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-267}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-99}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+57}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.8e19 or 3.20000000000000029e57 < z Initial program 47.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified79.2%
Taylor expanded in x around inf
Simplified74.1%
if -7.8e19 < z < -3.30000000000000004e-267Initial program 87.4%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6440.7
Simplified40.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6449.0
Applied egg-rr49.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6440.7
Simplified40.7%
if -3.30000000000000004e-267 < z < 5.4e-99Initial program 92.8%
Taylor expanded in a around inf
Simplified48.1%
if 5.4e-99 < z < 3.20000000000000029e57Initial program 81.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6466.9
Simplified66.9%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6454.5
Simplified54.5%
Final simplification58.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma x (/ y z) t)))
(if (<= z -9.5e+33)
t_1
(if (<= z -1.05e-265)
(* t (/ y (- a z)))
(if (<= z 5e-100) x (if (<= z 5.2e+58) (* y (/ t (- a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, (y / z), t);
double tmp;
if (z <= -9.5e+33) {
tmp = t_1;
} else if (z <= -1.05e-265) {
tmp = t * (y / (a - z));
} else if (z <= 5e-100) {
tmp = x;
} else if (z <= 5.2e+58) {
tmp = y * (t / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(y / z), t) tmp = 0.0 if (z <= -9.5e+33) tmp = t_1; elseif (z <= -1.05e-265) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 5e-100) tmp = x; elseif (z <= 5.2e+58) tmp = Float64(y * Float64(t / Float64(a - z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -9.5e+33], t$95$1, If[LessEqual[z, -1.05e-265], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-100], x, If[LessEqual[z, 5.2e+58], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-265}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-100}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+58}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.5000000000000003e33 or 5.19999999999999976e58 < z Initial program 45.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.2%
Taylor expanded in x around inf
Simplified75.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6469.4
Simplified69.4%
if -9.5000000000000003e33 < z < -1.05000000000000002e-265Initial program 87.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6439.4
Simplified39.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6447.5
Applied egg-rr47.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6439.4
Simplified39.4%
if -1.05000000000000002e-265 < z < 5.0000000000000001e-100Initial program 92.8%
Taylor expanded in a around inf
Simplified48.1%
if 5.0000000000000001e-100 < z < 5.19999999999999976e58Initial program 82.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6464.9
Simplified64.9%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6452.9
Simplified52.9%
Final simplification56.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a z)))) (t_2 (fma x (/ y z) t)))
(if (<= z -9e+33)
t_2
(if (<= z 1.08e-231)
t_1
(if (<= z 5.8e-98) x (if (<= z 5.2e+58) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double t_2 = fma(x, (y / z), t);
double tmp;
if (z <= -9e+33) {
tmp = t_2;
} else if (z <= 1.08e-231) {
tmp = t_1;
} else if (z <= 5.8e-98) {
tmp = x;
} else if (z <= 5.2e+58) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) t_2 = fma(x, Float64(y / z), t) tmp = 0.0 if (z <= -9e+33) tmp = t_2; elseif (z <= 1.08e-231) tmp = t_1; elseif (z <= 5.8e-98) tmp = x; elseif (z <= 5.2e+58) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -9e+33], t$95$2, If[LessEqual[z, 1.08e-231], t$95$1, If[LessEqual[z, 5.8e-98], x, If[LessEqual[z, 5.2e+58], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
t_2 := \mathsf{fma}\left(x, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.0000000000000001e33 or 5.19999999999999976e58 < z Initial program 45.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.2%
Taylor expanded in x around inf
Simplified75.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6469.4
Simplified69.4%
if -9.0000000000000001e33 < z < 1.08e-231 or 5.8e-98 < z < 5.19999999999999976e58Initial program 87.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6447.4
Simplified47.4%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6443.2
Simplified43.2%
if 1.08e-231 < z < 5.8e-98Initial program 91.6%
Taylor expanded in a around inf
Simplified58.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -1.4e+47)
t
(if (<= z -2.7e-279)
t_1
(if (<= z 2.1e-98) x (if (<= z 72.0) t_1 (fma a (/ t z) t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -1.4e+47) {
tmp = t;
} else if (z <= -2.7e-279) {
tmp = t_1;
} else if (z <= 2.1e-98) {
tmp = x;
} else if (z <= 72.0) {
tmp = t_1;
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -1.4e+47) tmp = t; elseif (z <= -2.7e-279) tmp = t_1; elseif (z <= 2.1e-98) tmp = x; elseif (z <= 72.0) tmp = t_1; else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+47], t, If[LessEqual[z, -2.7e-279], t$95$1, If[LessEqual[z, 2.1e-98], x, If[LessEqual[z, 72.0], t$95$1, N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+47}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 72:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.39999999999999994e47Initial program 40.0%
Taylor expanded in z around inf
Simplified46.2%
if -1.39999999999999994e47 < z < -2.7000000000000001e-279 or 2.09999999999999992e-98 < z < 72Initial program 86.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6446.2
Simplified46.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6452.7
Applied egg-rr52.7%
Taylor expanded in z around 0
/-lowering-/.f6437.4
Simplified37.4%
if -2.7000000000000001e-279 < z < 2.09999999999999992e-98Initial program 92.7%
Taylor expanded in a around inf
Simplified49.0%
if 72 < z Initial program 54.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6449.3
Simplified49.3%
Taylor expanded in y around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6445.6
Simplified45.6%
Taylor expanded in z around inf
sub-negN/A
associate-/l*N/A
mul-1-negN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6449.9
Simplified49.9%
Final simplification44.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -1.4e+47)
t
(if (<= z -1.2e-275) t_1 (if (<= z 2.9e-96) x (if (<= z 6.0) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -1.4e+47) {
tmp = t;
} else if (z <= -1.2e-275) {
tmp = t_1;
} else if (z <= 2.9e-96) {
tmp = x;
} else if (z <= 6.0) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (z <= (-1.4d+47)) then
tmp = t
else if (z <= (-1.2d-275)) then
tmp = t_1
else if (z <= 2.9d-96) then
tmp = x
else if (z <= 6.0d0) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -1.4e+47) {
tmp = t;
} else if (z <= -1.2e-275) {
tmp = t_1;
} else if (z <= 2.9e-96) {
tmp = x;
} else if (z <= 6.0) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -1.4e+47: tmp = t elif z <= -1.2e-275: tmp = t_1 elif z <= 2.9e-96: tmp = x elif z <= 6.0: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -1.4e+47) tmp = t; elseif (z <= -1.2e-275) tmp = t_1; elseif (z <= 2.9e-96) tmp = x; elseif (z <= 6.0) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (z <= -1.4e+47) tmp = t; elseif (z <= -1.2e-275) tmp = t_1; elseif (z <= 2.9e-96) tmp = x; elseif (z <= 6.0) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+47], t, If[LessEqual[z, -1.2e-275], t$95$1, If[LessEqual[z, 2.9e-96], x, If[LessEqual[z, 6.0], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+47}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-96}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.39999999999999994e47 or 6 < z Initial program 48.1%
Taylor expanded in z around inf
Simplified47.2%
if -1.39999999999999994e47 < z < -1.19999999999999995e-275 or 2.89999999999999994e-96 < z < 6Initial program 86.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6446.2
Simplified46.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6452.7
Applied egg-rr52.7%
Taylor expanded in z around 0
/-lowering-/.f6437.4
Simplified37.4%
if -1.19999999999999995e-275 < z < 2.89999999999999994e-96Initial program 92.7%
Taylor expanded in a around inf
Simplified49.0%
Final simplification44.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x t) (/ (- y a) z) t)))
(if (<= z -5.5e+47)
t_1
(if (<= z 3.5e+59) (fma (- t x) (/ y (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - t), ((y - a) / z), t);
double tmp;
if (z <= -5.5e+47) {
tmp = t_1;
} else if (z <= 3.5e+59) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - t), Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -5.5e+47) tmp = t_1; elseif (z <= 3.5e+59) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5.5e+47], t$95$1, If[LessEqual[z, 3.5e+59], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.4999999999999998e47 or 3.5e59 < z Initial program 44.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.4%
if -5.4999999999999998e47 < z < 3.5e59Initial program 88.2%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.3
Applied egg-rr93.3%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6485.2
Simplified85.2%
Final simplification83.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) z) (- y a) t)))
(if (<= z -1.1e+78)
t_1
(if (<= z 7e+59) (fma (- t x) (/ y (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), (y - a), t);
double tmp;
if (z <= -1.1e+78) {
tmp = t_1;
} else if (z <= 7e+59) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), Float64(y - a), t) tmp = 0.0 if (z <= -1.1e+78) tmp = t_1; elseif (z <= 7e+59) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.1e+78], t$95$1, If[LessEqual[z, 7e+59], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.10000000000000007e78 or 7e59 < z Initial program 42.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified82.9%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
unsub-negN/A
--lowering--.f64N/A
--lowering--.f6481.8
Applied egg-rr81.8%
if -1.10000000000000007e78 < z < 7e59Initial program 87.4%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.2
Applied egg-rr92.2%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6483.7
Simplified83.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2e+79) (fma (/ x z) (- y a) t) (if (<= z 3.1e+59) (fma (- t x) (/ y (- a z)) x) (fma (- x t) (/ y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+79) {
tmp = fma((x / z), (y - a), t);
} else if (z <= 3.1e+59) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+79) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= 3.1e+59) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+79], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 3.1e+59], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.19999999999999993e79Initial program 35.7%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified84.1%
Taylor expanded in x around inf
Simplified80.4%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.4
Applied egg-rr82.4%
if -1.19999999999999993e79 < z < 3.10000000000000015e59Initial program 87.4%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.2
Applied egg-rr92.2%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6483.7
Simplified83.7%
if 3.10000000000000015e59 < z Initial program 48.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.9%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6477.9
Simplified77.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+34) (fma (/ x z) (- y a) t) (if (<= z 1.5e-27) (fma y (/ (- t x) a) x) (fma (- x t) (/ y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+34) {
tmp = fma((x / z), (y - a), t);
} else if (z <= 1.5e-27) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+34) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= 1.5e-27) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+34], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.5e-27], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -3.8000000000000001e34Initial program 43.7%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified80.7%
Taylor expanded in x around inf
Simplified75.9%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.0
Applied egg-rr76.0%
if -3.8000000000000001e34 < z < 1.5000000000000001e-27Initial program 90.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.4
Simplified76.4%
if 1.5000000000000001e-27 < z Initial program 53.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified77.7%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6473.3
Simplified73.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e+34) (fma x (/ (- y a) z) t) (if (<= z 2.2e-29) (fma y (/ (- t x) a) x) (fma (- x t) (/ y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+34) {
tmp = fma(x, ((y - a) / z), t);
} else if (z <= 2.2e-29) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+34) tmp = fma(x, Float64(Float64(y - a) / z), t); elseif (z <= 2.2e-29) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+34], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.2e-29], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -5.19999999999999995e34Initial program 43.7%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified80.7%
Taylor expanded in x around inf
Simplified75.9%
if -5.19999999999999995e34 < z < 2.1999999999999999e-29Initial program 90.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.4
Simplified76.4%
if 2.1999999999999999e-29 < z Initial program 53.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified77.7%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6473.3
Simplified73.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma x (/ (- y a) z) t))) (if (<= z -2.5e+34) t_1 (if (<= z 2.05e+82) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, ((y - a) / z), t);
double tmp;
if (z <= -2.5e+34) {
tmp = t_1;
} else if (z <= 2.05e+82) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -2.5e+34) tmp = t_1; elseif (z <= 2.05e+82) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.5e+34], t$95$1, If[LessEqual[z, 2.05e+82], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.4999999999999999e34 or 2.04999999999999998e82 < z Initial program 44.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.9%
Taylor expanded in x around inf
Simplified77.1%
if -2.4999999999999999e34 < z < 2.04999999999999998e82Initial program 87.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6471.3
Simplified71.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e+174) x (if (<= a 1.9e+65) (fma x (/ y z) t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e+174) {
tmp = x;
} else if (a <= 1.9e+65) {
tmp = fma(x, (y / z), t);
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e+174) tmp = x; elseif (a <= 1.9e+65) tmp = fma(x, Float64(y / z), t); else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e+174], x, If[LessEqual[a, 1.9e+65], N[(x * N[(y / z), $MachinePrecision] + t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+174}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.5000000000000001e174 or 1.90000000000000006e65 < a Initial program 78.1%
Taylor expanded in a around inf
Simplified49.5%
if -6.5000000000000001e174 < a < 1.90000000000000006e65Initial program 66.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified67.2%
Taylor expanded in x around inf
Simplified56.8%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6453.8
Simplified53.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.3e+80) t (if (<= z -1.85e+34) (* x (/ y z)) (if (<= z 2.05e+59) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+80) {
tmp = t;
} else if (z <= -1.85e+34) {
tmp = x * (y / z);
} else if (z <= 2.05e+59) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.3d+80)) then
tmp = t
else if (z <= (-1.85d+34)) then
tmp = x * (y / z)
else if (z <= 2.05d+59) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+80) {
tmp = t;
} else if (z <= -1.85e+34) {
tmp = x * (y / z);
} else if (z <= 2.05e+59) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.3e+80: tmp = t elif z <= -1.85e+34: tmp = x * (y / z) elif z <= 2.05e+59: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e+80) tmp = t; elseif (z <= -1.85e+34) tmp = Float64(x * Float64(y / z)); elseif (z <= 2.05e+59) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.3e+80) tmp = t; elseif (z <= -1.85e+34) tmp = x * (y / z); elseif (z <= 2.05e+59) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+80], t, If[LessEqual[z, -1.85e+34], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+59], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+80}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+59}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.29999999999999991e80 or 2.05e59 < z Initial program 41.7%
Taylor expanded in z around inf
Simplified55.0%
if -3.29999999999999991e80 < z < -1.85000000000000004e34Initial program 76.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified69.9%
Taylor expanded in x around inf
Simplified62.1%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.6
Simplified47.6%
if -1.85000000000000004e34 < z < 2.05e59Initial program 88.4%
Taylor expanded in a around inf
Simplified31.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.05e+90) x (if (<= a 3.7e+69) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+90) {
tmp = x;
} else if (a <= 3.7e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.05d+90)) then
tmp = x
else if (a <= 3.7d+69) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+90) {
tmp = x;
} else if (a <= 3.7e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.05e+90: tmp = x elif a <= 3.7e+69: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.05e+90) tmp = x; elseif (a <= 3.7e+69) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.05e+90) tmp = x; elseif (a <= 3.7e+69) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.05e+90], x, If[LessEqual[a, 3.7e+69], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+90}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.05000000000000021e90 or 3.6999999999999999e69 < a Initial program 78.1%
Taylor expanded in a around inf
Simplified48.5%
if -2.05000000000000021e90 < a < 3.6999999999999999e69Initial program 66.0%
Taylor expanded in z around inf
Simplified35.0%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 69.9%
Taylor expanded in z around inf
Simplified26.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024199
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))