
(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
(if (<= z -3e+91)
(fma (- x t) (/ (- y a) z) t)
(if (<= z 4e+202)
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* (- a y) (/ (- t x) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+91) {
tmp = fma((x - t), ((y - a) / z), t);
} else if (z <= 4e+202) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + ((a - y) * ((t - x) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+91) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); elseif (z <= 4e+202) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(a - y) * Float64(Float64(t - x) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+91], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 4e+202], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(a - y\right) \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if z < -3.00000000000000006e91Initial program 25.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
Simplified80.3%
if -3.00000000000000006e91 < z < 3.9999999999999996e202Initial program 84.6%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.9
Applied egg-rr94.9%
if 3.9999999999999996e202 < z Initial program 18.2%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6456.6
Applied egg-rr56.6%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6456.6
Applied egg-rr56.6%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6495.3
Simplified95.3%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6495.4
Applied egg-rr95.4%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma z (/ x a) x)))
(if (<= a -5.2e+69)
t_1
(if (<= a -7.6e-135)
t
(if (<= a 9.6e-141)
(* x (/ y z))
(if (<= a 1.85e+145) (* t (/ (- y z) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, (x / a), x);
double tmp;
if (a <= -5.2e+69) {
tmp = t_1;
} else if (a <= -7.6e-135) {
tmp = t;
} else if (a <= 9.6e-141) {
tmp = x * (y / z);
} else if (a <= 1.85e+145) {
tmp = t * ((y - z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(x / a), x) tmp = 0.0 if (a <= -5.2e+69) tmp = t_1; elseif (a <= -7.6e-135) tmp = t; elseif (a <= 9.6e-141) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.85e+145) tmp = Float64(t * Float64(Float64(y - z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.2e+69], t$95$1, If[LessEqual[a, -7.6e-135], t, If[LessEqual[a, 9.6e-141], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+145], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.6 \cdot 10^{-135}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-141}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+145}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.2000000000000004e69 or 1.84999999999999997e145 < a Initial program 68.5%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.6
Simplified64.6%
Taylor expanded in z around inf
Simplified57.5%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6456.6
Simplified56.6%
if -5.2000000000000004e69 < a < -7.6000000000000005e-135Initial program 71.3%
Taylor expanded in z around inf
Simplified50.9%
if -7.6000000000000005e-135 < a < 9.6000000000000004e-141Initial program 66.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6431.2
Simplified31.2%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6430.7
Simplified30.7%
Taylor expanded in z around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.1
Simplified47.1%
if 9.6000000000000004e-141 < a < 1.84999999999999997e145Initial program 70.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6449.8
Simplified49.8%
Taylor expanded in a around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6436.1
Simplified36.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.5e+207)
(fma (- t x) (/ a z) t)
(if (<= z -1.85e-65)
(* (- y z) (/ t (- a z)))
(if (<= z 3.5e+42) (fma (- t x) (/ y a) x) (- t (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+207) {
tmp = fma((t - x), (a / z), t);
} else if (z <= -1.85e-65) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 3.5e+42) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t - (t * (y / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+207) tmp = fma(Float64(t - x), Float64(a / z), t); elseif (z <= -1.85e-65) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= 3.5e+42) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = Float64(t - Float64(t * Float64(y / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+207], N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -1.85e-65], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+42], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+207}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{a}{z}, t\right)\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-65}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+42}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -8.4999999999999996e207Initial program 11.9%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6443.7
Applied egg-rr43.7%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6443.7
Applied egg-rr43.7%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.8
Simplified79.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6458.0
Simplified58.0%
if -8.4999999999999996e207 < z < -1.85e-65Initial program 70.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6450.6
Simplified50.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6458.9
Applied egg-rr58.9%
if -1.85e-65 < z < 3.50000000000000023e42Initial program 90.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.7
Applied egg-rr96.7%
Taylor expanded in z around 0
/-lowering-/.f6474.9
Simplified74.9%
if 3.50000000000000023e42 < z Initial program 43.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.4
Simplified43.4%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.9
Simplified59.9%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.9
Simplified59.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -7e+53)
t_1
(if (<= a 4.8e-21) (+ t (* (- a y) (/ (- t x) z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -7e+53) {
tmp = t_1;
} else if (a <= 4.8e-21) {
tmp = t + ((a - y) * ((t - x) / z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -7e+53) tmp = t_1; elseif (a <= 4.8e-21) tmp = Float64(t + Float64(Float64(a - y) * Float64(Float64(t - x) / z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -7e+53], t$95$1, If[LessEqual[a, 4.8e-21], N[(t + N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -7 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-21}:\\
\;\;\;\;t + \left(a - y\right) \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.00000000000000038e53 or 4.7999999999999999e-21 < a Initial program 67.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.0
Simplified79.0%
if -7.00000000000000038e53 < a < 4.7999999999999999e-21Initial program 70.3%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.6
Applied egg-rr79.6%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.6
Applied egg-rr79.6%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.3
Simplified77.3%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.3
Applied egg-rr77.3%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -6.5e+54)
t_1
(if (<= a 4.7e-21) (fma (- x t) (/ (- y a) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -6.5e+54) {
tmp = t_1;
} else if (a <= 4.7e-21) {
tmp = fma((x - t), ((y - a) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -6.5e+54) tmp = t_1; elseif (a <= 4.7e-21) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -6.5e+54], t$95$1, If[LessEqual[a, 4.7e-21], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.5e54 or 4.7000000000000003e-21 < a Initial program 67.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.0
Simplified79.0%
if -6.5e54 < a < 4.7000000000000003e-21Initial program 70.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
Simplified80.1%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -2.6e+44)
t_1
(if (<= a 4.8e-21) (fma (- a y) (/ (- t x) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -2.6e+44) {
tmp = t_1;
} else if (a <= 4.8e-21) {
tmp = fma((a - y), ((t - x) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -2.6e+44) tmp = t_1; elseif (a <= 4.8e-21) tmp = fma(Float64(a - y), Float64(Float64(t - x) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.6e+44], t$95$1, If[LessEqual[a, 4.8e-21], N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(a - y, \frac{t - x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.5999999999999999e44 or 4.7999999999999999e-21 < a Initial program 67.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.0
Simplified79.0%
if -2.5999999999999999e44 < a < 4.7999999999999999e-21Initial program 70.3%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.6
Applied egg-rr79.6%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.6
Applied egg-rr79.6%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.3
Simplified77.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- a y) (/ (- t x) z) t))) (if (<= z -4e-64) t_1 (if (<= z 1.02e+15) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((a - y), ((t - x) / z), t);
double tmp;
if (z <= -4e-64) {
tmp = t_1;
} else if (z <= 1.02e+15) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(a - y), Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -4e-64) tmp = t_1; elseif (z <= 1.02e+15) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - y), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -4e-64], t$95$1, If[LessEqual[z, 1.02e+15], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a - y, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.99999999999999986e-64 or 1.02e15 < z Initial program 50.6%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6475.5
Applied egg-rr75.5%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.5
Applied egg-rr75.5%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.7
Simplified73.7%
if -3.99999999999999986e-64 < z < 1.02e15Initial program 90.4%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.6
Applied egg-rr96.6%
Taylor expanded in z around 0
/-lowering-/.f6475.5
Simplified75.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.9e+74)
(fma z (/ x a) x)
(if (<= a -2.15e-134)
t
(if (<= a 2.85e-168) (* x (/ y z)) (if (<= a 380000000000.0) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e+74) {
tmp = fma(z, (x / a), x);
} else if (a <= -2.15e-134) {
tmp = t;
} else if (a <= 2.85e-168) {
tmp = x * (y / z);
} else if (a <= 380000000000.0) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e+74) tmp = fma(z, Float64(x / a), x); elseif (a <= -2.15e-134) tmp = t; elseif (a <= 2.85e-168) tmp = Float64(x * Float64(y / z)); elseif (a <= 380000000000.0) tmp = t; else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e+74], N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, -2.15e-134], t, If[LessEqual[a, 2.85e-168], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 380000000000.0], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{elif}\;a \leq -2.15 \cdot 10^{-134}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 2.85 \cdot 10^{-168}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 380000000000:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.8999999999999999e74Initial program 64.2%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6460.2
Simplified60.2%
Taylor expanded in z around inf
Simplified49.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6447.6
Simplified47.6%
if -1.8999999999999999e74 < a < -2.14999999999999993e-134 or 2.85000000000000004e-168 < a < 3.8e11Initial program 73.6%
Taylor expanded in z around inf
Simplified42.5%
if -2.14999999999999993e-134 < a < 2.85000000000000004e-168Initial program 68.0%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6432.5
Simplified32.5%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6431.9
Simplified31.9%
Taylor expanded in z around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6449.0
Simplified49.0%
if 3.8e11 < a Initial program 68.6%
Taylor expanded in a around inf
Simplified43.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.8e+69)
x
(if (<= a -7.6e-135)
t
(if (<= a 1.85e-171) (* x (/ y z)) (if (<= a 170000000000.0) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e+69) {
tmp = x;
} else if (a <= -7.6e-135) {
tmp = t;
} else if (a <= 1.85e-171) {
tmp = x * (y / z);
} else if (a <= 170000000000.0) {
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 <= (-4.8d+69)) then
tmp = x
else if (a <= (-7.6d-135)) then
tmp = t
else if (a <= 1.85d-171) then
tmp = x * (y / z)
else if (a <= 170000000000.0d0) 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 <= -4.8e+69) {
tmp = x;
} else if (a <= -7.6e-135) {
tmp = t;
} else if (a <= 1.85e-171) {
tmp = x * (y / z);
} else if (a <= 170000000000.0) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.8e+69: tmp = x elif a <= -7.6e-135: tmp = t elif a <= 1.85e-171: tmp = x * (y / z) elif a <= 170000000000.0: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.8e+69) tmp = x; elseif (a <= -7.6e-135) tmp = t; elseif (a <= 1.85e-171) tmp = Float64(x * Float64(y / z)); elseif (a <= 170000000000.0) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.8e+69) tmp = x; elseif (a <= -7.6e-135) tmp = t; elseif (a <= 1.85e-171) tmp = x * (y / z); elseif (a <= 170000000000.0) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e+69], x, If[LessEqual[a, -7.6e-135], t, If[LessEqual[a, 1.85e-171], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 170000000000.0], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+69}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7.6 \cdot 10^{-135}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-171}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 170000000000:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.8000000000000003e69 or 1.7e11 < a Initial program 66.7%
Taylor expanded in a around inf
Simplified45.2%
if -4.8000000000000003e69 < a < -7.6000000000000005e-135 or 1.85000000000000006e-171 < a < 1.7e11Initial program 73.6%
Taylor expanded in z around inf
Simplified42.5%
if -7.6000000000000005e-135 < a < 1.85000000000000006e-171Initial program 68.0%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6432.5
Simplified32.5%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6431.9
Simplified31.9%
Taylor expanded in z around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6449.0
Simplified49.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- a y) (- (/ x z)) t))) (if (<= z -0.72) t_1 (if (<= z 1.1e+50) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((a - y), -(x / z), t);
double tmp;
if (z <= -0.72) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(a - y), Float64(-Float64(x / z)), t) tmp = 0.0 if (z <= -0.72) tmp = t_1; elseif (z <= 1.1e+50) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - y), $MachinePrecision] * (-N[(x / z), $MachinePrecision]) + t), $MachinePrecision]}, If[LessEqual[z, -0.72], t$95$1, If[LessEqual[z, 1.1e+50], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a - y, -\frac{x}{z}, t\right)\\
\mathbf{if}\;z \leq -0.72:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.71999999999999997 or 1.10000000000000008e50 < z Initial program 43.3%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6471.1
Applied egg-rr71.1%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6471.1
Applied egg-rr71.1%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.7
Simplified76.7%
Taylor expanded in t around 0
mul-1-negN/A
neg-lowering-neg.f6471.7
Simplified71.7%
if -0.71999999999999997 < z < 1.10000000000000008e50Initial program 90.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.1
Applied egg-rr97.1%
Taylor expanded in z around 0
/-lowering-/.f6472.3
Simplified72.3%
Final simplification72.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.8e+71) (fma (- t x) (/ a z) t) (if (<= z 7.2e+47) (fma (- t x) (/ y a) x) (- t (* t (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e+71) {
tmp = fma((t - x), (a / z), t);
} else if (z <= 7.2e+47) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t - (t * (y / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.8e+71) tmp = fma(Float64(t - x), Float64(a / z), t); elseif (z <= 7.2e+47) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = Float64(t - Float64(t * Float64(y / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.8e+71], N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 7.2e+47], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{a}{z}, t\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -7.8000000000000002e71Initial program 30.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6460.0
Applied egg-rr60.0%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6460.0
Applied egg-rr60.0%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.7
Simplified77.7%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6454.6
Simplified54.6%
if -7.8000000000000002e71 < z < 7.20000000000000015e47Initial program 89.1%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.1
Applied egg-rr96.1%
Taylor expanded in z around 0
/-lowering-/.f6468.0
Simplified68.0%
if 7.20000000000000015e47 < z Initial program 43.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.4
Simplified43.4%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.9
Simplified59.9%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.9
Simplified59.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.6e+68) (fma (- t x) (/ a z) t) (if (<= z 2.3e+39) (fma y (/ (- t x) a) x) (- t (* t (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.6e+68) {
tmp = fma((t - x), (a / z), t);
} else if (z <= 2.3e+39) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t - (t * (y / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.6e+68) tmp = fma(Float64(t - x), Float64(a / z), t); elseif (z <= 2.3e+39) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = Float64(t - Float64(t * Float64(y / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.6e+68], N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.3e+39], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{a}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -7.6000000000000002e68Initial program 30.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6460.0
Applied egg-rr60.0%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6460.0
Applied egg-rr60.0%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.7
Simplified77.7%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6454.6
Simplified54.6%
if -7.6000000000000002e68 < z < 2.30000000000000012e39Initial program 89.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6465.5
Simplified65.5%
if 2.30000000000000012e39 < z Initial program 43.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.4
Simplified43.4%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.9
Simplified59.9%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.9
Simplified59.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.8e+64) (fma a (/ (- t x) z) t) (if (<= z 1.5e+41) (fma y (/ (- t x) a) x) (- t (* t (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e+64) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 1.5e+41) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t - (t * (y / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.8e+64) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 1.5e+41) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = Float64(t - Float64(t * Float64(y / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.8e+64], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.5e+41], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -7.7999999999999996e64Initial program 30.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6460.0
Applied egg-rr60.0%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6460.0
Applied egg-rr60.0%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.7
Simplified77.7%
Taylor expanded in a around inf
Simplified52.9%
if -7.7999999999999996e64 < z < 1.4999999999999999e41Initial program 89.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6465.5
Simplified65.5%
if 1.4999999999999999e41 < z Initial program 43.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.4
Simplified43.4%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.9
Simplified59.9%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.9
Simplified59.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.3e+69) (fma z (/ x a) x) (if (<= a 290000000000.0) (- t (* t (/ y z))) (- x (/ (* x y) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+69) {
tmp = fma(z, (x / a), x);
} else if (a <= 290000000000.0) {
tmp = t - (t * (y / z));
} else {
tmp = x - ((x * y) / a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.3e+69) tmp = fma(z, Float64(x / a), x); elseif (a <= 290000000000.0) tmp = Float64(t - Float64(t * Float64(y / z))); else tmp = Float64(x - Float64(Float64(x * y) / a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.3e+69], N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 290000000000.0], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{elif}\;a \leq 290000000000:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\
\end{array}
\end{array}
if a < -3.2999999999999999e69Initial program 64.9%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.0
Simplified59.0%
Taylor expanded in z around inf
Simplified48.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6446.7
Simplified46.7%
if -3.2999999999999999e69 < a < 2.9e11Initial program 70.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6454.9
Simplified54.9%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6454.3
Simplified54.3%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6454.3
Simplified54.3%
if 2.9e11 < a Initial program 68.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6452.6
Simplified52.6%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6445.2
Simplified45.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -3e+67) (fma z (/ x a) x) (if (<= a 9.6e+132) (- t (* t (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e+67) {
tmp = fma(z, (x / a), x);
} else if (a <= 9.6e+132) {
tmp = t - (t * (y / z));
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e+67) tmp = fma(z, Float64(x / a), x); elseif (a <= 9.6e+132) tmp = Float64(t - Float64(t * Float64(y / z))); else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e+67], N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 9.6e+132], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{+132}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.0000000000000001e67Initial program 64.9%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.0
Simplified59.0%
Taylor expanded in z around inf
Simplified48.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6446.7
Simplified46.7%
if -3.0000000000000001e67 < a < 9.6000000000000004e132Initial program 69.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6451.3
Simplified51.3%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6448.5
Simplified48.5%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6448.5
Simplified48.5%
if 9.6000000000000004e132 < a Initial program 71.3%
Taylor expanded in a around inf
Simplified67.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.15e+72) x (if (<= a 4000000000000.0) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e+72) {
tmp = x;
} else if (a <= 4000000000000.0) {
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 <= (-1.15d+72)) then
tmp = x
else if (a <= 4000000000000.0d0) 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 <= -1.15e+72) {
tmp = x;
} else if (a <= 4000000000000.0) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.15e+72: tmp = x elif a <= 4000000000000.0: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.15e+72) tmp = x; elseif (a <= 4000000000000.0) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.15e+72) tmp = x; elseif (a <= 4000000000000.0) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e+72], x, If[LessEqual[a, 4000000000000.0], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+72}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4000000000000:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.15e72 or 4e12 < a Initial program 66.7%
Taylor expanded in a around inf
Simplified45.2%
if -1.15e72 < a < 4e12Initial program 71.0%
Taylor expanded in z around inf
Simplified36.9%
(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.1%
Taylor expanded in z around inf
Simplified24.4%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 69.1%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6441.9
Simplified41.9%
Taylor expanded in z around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lft2.7
Simplified2.7%
(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 2024204
(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))))