
(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 21 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 -6.8e+138)
(+ t (/ (- y a) (/ z (- x t))))
(if (<= z 6.2e+168)
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* (- y a) (/ (- x t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+138) {
tmp = t + ((y - a) / (z / (x - t)));
} else if (z <= 6.2e+168) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + ((y - a) * ((x - t) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e+138) tmp = Float64(t + Float64(Float64(y - a) / Float64(z / Float64(x - t)))); elseif (z <= 6.2e+168) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+138], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+168], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+138}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x - t}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+168}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if z < -6.80000000000000022e138Initial program 10.4%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6457.8
Applied egg-rr57.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6488.2
Simplified88.2%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6488.3
Applied egg-rr88.3%
if -6.80000000000000022e138 < z < 6.19999999999999993e168Initial program 82.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.1
Applied egg-rr92.1%
if 6.19999999999999993e168 < z Initial program 29.4%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6447.1
Applied egg-rr47.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6486.9
Simplified86.9%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+80)
t
(if (<= z -2.65e-128)
(/ (* (- y a) x) z)
(if (<= z -1.8e-221)
(* t (/ y (- a z)))
(if (<= z 7.4e-26) (- x (/ (* y x) a)) (* (/ t z) (- z y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+80) {
tmp = t;
} else if (z <= -2.65e-128) {
tmp = ((y - a) * x) / z;
} else if (z <= -1.8e-221) {
tmp = t * (y / (a - z));
} else if (z <= 7.4e-26) {
tmp = x - ((y * x) / a);
} else {
tmp = (t / z) * (z - y);
}
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 <= (-2.3d+80)) then
tmp = t
else if (z <= (-2.65d-128)) then
tmp = ((y - a) * x) / z
else if (z <= (-1.8d-221)) then
tmp = t * (y / (a - z))
else if (z <= 7.4d-26) then
tmp = x - ((y * x) / a)
else
tmp = (t / z) * (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+80) {
tmp = t;
} else if (z <= -2.65e-128) {
tmp = ((y - a) * x) / z;
} else if (z <= -1.8e-221) {
tmp = t * (y / (a - z));
} else if (z <= 7.4e-26) {
tmp = x - ((y * x) / a);
} else {
tmp = (t / z) * (z - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+80: tmp = t elif z <= -2.65e-128: tmp = ((y - a) * x) / z elif z <= -1.8e-221: tmp = t * (y / (a - z)) elif z <= 7.4e-26: tmp = x - ((y * x) / a) else: tmp = (t / z) * (z - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+80) tmp = t; elseif (z <= -2.65e-128) tmp = Float64(Float64(Float64(y - a) * x) / z); elseif (z <= -1.8e-221) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 7.4e-26) tmp = Float64(x - Float64(Float64(y * x) / a)); else tmp = Float64(Float64(t / z) * Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+80) tmp = t; elseif (z <= -2.65e-128) tmp = ((y - a) * x) / z; elseif (z <= -1.8e-221) tmp = t * (y / (a - z)); elseif (z <= 7.4e-26) tmp = x - ((y * x) / a); else tmp = (t / z) * (z - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+80], t, If[LessEqual[z, -2.65e-128], N[(N[(N[(y - a), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.8e-221], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e-26], N[(x - N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+80}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-128}:\\
\;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-221}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-26}:\\
\;\;\;\;x - \frac{y \cdot x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -2.30000000000000004e80Initial program 28.4%
Taylor expanded in z around inf
Simplified52.7%
if -2.30000000000000004e80 < z < -2.6499999999999999e-128Initial program 74.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6482.6
Applied egg-rr82.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6453.4
Simplified53.4%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6434.2
Simplified34.2%
if -2.6499999999999999e-128 < z < -1.80000000000000006e-221Initial program 83.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6456.7
Simplified56.7%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.6
Simplified72.6%
if -1.80000000000000006e-221 < z < 7.3999999999999997e-26Initial program 94.8%
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--.f6466.5
Simplified66.5%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6460.7
Simplified60.7%
if 7.3999999999999997e-26 < z Initial program 51.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6445.9
Simplified45.9%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6438.4
Simplified38.4%
neg-mul-1N/A
*-commutativeN/A
times-fracN/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.7
Applied egg-rr44.7%
Final simplification51.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+51)
t
(if (<= z -5.5e-127)
(/ (fma y x 0.0) z)
(if (<= z 1.65e-234)
(* t (/ y a))
(if (<= z 1.98e-19) (fma z (/ x a) x) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+51) {
tmp = t;
} else if (z <= -5.5e-127) {
tmp = fma(y, x, 0.0) / z;
} else if (z <= 1.65e-234) {
tmp = t * (y / a);
} else if (z <= 1.98e-19) {
tmp = fma(z, (x / a), x);
} else {
tmp = t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+51) tmp = t; elseif (z <= -5.5e-127) tmp = Float64(fma(y, x, 0.0) / z); elseif (z <= 1.65e-234) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.98e-19) tmp = fma(z, Float64(x / a), x); else tmp = t; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+51], t, If[LessEqual[z, -5.5e-127], N[(N[(y * x + 0.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.65e-234], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.98e-19], N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+51}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, 0\right)}{z}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-234}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.98 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.7999999999999997e51 or 1.98000000000000001e-19 < z Initial program 42.5%
Taylor expanded in z around inf
Simplified45.0%
if -3.7999999999999997e51 < z < -5.50000000000000036e-127Initial program 80.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--.f6452.3
Simplified52.3%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6428.8
Simplified28.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
mul0-rgtN/A
accelerator-lowering-fma.f6432.7
Simplified32.7%
if -5.50000000000000036e-127 < z < 1.65000000000000007e-234Initial program 88.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6445.8
Simplified45.8%
Taylor expanded in a around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6437.7
Simplified37.7%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.1
Applied egg-rr49.1%
Taylor expanded in y around inf
/-lowering-/.f6447.0
Simplified47.0%
if 1.65000000000000007e-234 < z < 1.98000000000000001e-19Initial program 97.8%
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--.f6471.9
Simplified71.9%
Taylor expanded in z around inf
Simplified52.5%
Taylor expanded in a around inf
/-lowering-/.f6454.4
Simplified54.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (- y a) (/ (- x t) z)))))
(if (<= z -6.5e+138)
t_1
(if (<= z 3.2e+162) (fma (- t x) (/ (- y z) (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y - a) * ((x - t) / z));
double tmp;
if (z <= -6.5e+138) {
tmp = t_1;
} else if (z <= 3.2e+162) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))) tmp = 0.0 if (z <= -6.5e+138) tmp = t_1; elseif (z <= 3.2e+162) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+138], t$95$1, If[LessEqual[z, 3.2e+162], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+162}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.50000000000000054e138 or 3.2000000000000001e162 < z Initial program 20.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6452.4
Applied egg-rr52.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6487.6
Simplified87.6%
if -6.50000000000000054e138 < z < 3.2000000000000001e162Initial program 82.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.1
Applied egg-rr92.1%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.75e+72)
t
(if (<= z -8.5e-223)
(* t (/ y (- a z)))
(if (<= z 6.9e-28) (- x (/ (* y x) a)) (* (/ t z) (- z y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+72) {
tmp = t;
} else if (z <= -8.5e-223) {
tmp = t * (y / (a - z));
} else if (z <= 6.9e-28) {
tmp = x - ((y * x) / a);
} else {
tmp = (t / z) * (z - y);
}
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 <= (-1.75d+72)) then
tmp = t
else if (z <= (-8.5d-223)) then
tmp = t * (y / (a - z))
else if (z <= 6.9d-28) then
tmp = x - ((y * x) / a)
else
tmp = (t / z) * (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+72) {
tmp = t;
} else if (z <= -8.5e-223) {
tmp = t * (y / (a - z));
} else if (z <= 6.9e-28) {
tmp = x - ((y * x) / a);
} else {
tmp = (t / z) * (z - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+72: tmp = t elif z <= -8.5e-223: tmp = t * (y / (a - z)) elif z <= 6.9e-28: tmp = x - ((y * x) / a) else: tmp = (t / z) * (z - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+72) tmp = t; elseif (z <= -8.5e-223) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 6.9e-28) tmp = Float64(x - Float64(Float64(y * x) / a)); else tmp = Float64(Float64(t / z) * Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e+72) tmp = t; elseif (z <= -8.5e-223) tmp = t * (y / (a - z)); elseif (z <= 6.9e-28) tmp = x - ((y * x) / a); else tmp = (t / z) * (z - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+72], t, If[LessEqual[z, -8.5e-223], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.9e-28], N[(x - N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 6.9 \cdot 10^{-28}:\\
\;\;\;\;x - \frac{y \cdot x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -1.75000000000000005e72Initial program 28.4%
Taylor expanded in z around inf
Simplified52.7%
if -1.75000000000000005e72 < z < -8.5000000000000003e-223Initial program 77.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6445.3
Simplified45.3%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6437.4
Simplified37.4%
if -8.5000000000000003e-223 < z < 6.90000000000000001e-28Initial program 94.8%
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--.f6466.5
Simplified66.5%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6460.7
Simplified60.7%
if 6.90000000000000001e-28 < z Initial program 51.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6445.9
Simplified45.9%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6438.4
Simplified38.4%
neg-mul-1N/A
*-commutativeN/A
times-fracN/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.7
Applied egg-rr44.7%
Final simplification49.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.5e+104)
(fma z (/ x a) x)
(if (<= a 3.3e-53)
(* (/ t z) (- z y))
(if (<= a 2.4e+126) (* y (/ (- t x) a)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+104) {
tmp = fma(z, (x / a), x);
} else if (a <= 3.3e-53) {
tmp = (t / z) * (z - y);
} else if (a <= 2.4e+126) {
tmp = y * ((t - x) / a);
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+104) tmp = fma(z, Float64(x / a), x); elseif (a <= 3.3e-53) tmp = Float64(Float64(t / z) * Float64(z - y)); elseif (a <= 2.4e+126) tmp = Float64(y * Float64(Float64(t - x) / a)); else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+104], N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 3.3e-53], N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e+126], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-53}:\\
\;\;\;\;\frac{t}{z} \cdot \left(z - y\right)\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{+126}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.4999999999999998e104Initial program 58.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--.f6451.4
Simplified51.4%
Taylor expanded in z around inf
Simplified51.4%
Taylor expanded in a around inf
/-lowering-/.f6449.2
Simplified49.2%
if -2.4999999999999998e104 < a < 3.30000000000000004e-53Initial program 70.3%
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.f6442.3
Simplified42.3%
neg-mul-1N/A
*-commutativeN/A
times-fracN/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6447.2
Applied egg-rr47.2%
if 3.30000000000000004e-53 < a < 2.40000000000000012e126Initial program 70.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6475.7
Applied egg-rr75.7%
Taylor expanded in a around inf
Simplified55.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f6438.3
Simplified38.3%
if 2.40000000000000012e126 < a Initial program 54.8%
Taylor expanded in a around inf
Simplified52.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -40.0)
t_1
(if (<= a 2.85e-52) (+ t (* (- y a) (/ (- x t) 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 <= -40.0) {
tmp = t_1;
} else if (a <= 2.85e-52) {
tmp = t + ((y - a) * ((x - t) / 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 <= -40.0) tmp = t_1; elseif (a <= 2.85e-52) tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / 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, -40.0], t$95$1, If[LessEqual[a, 2.85e-52], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $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 -40:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.85 \cdot 10^{-52}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -40 or 2.8499999999999999e-52 < a Initial program 63.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--.f6472.4
Simplified72.4%
if -40 < a < 2.8499999999999999e-52Initial program 68.7%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.2
Applied egg-rr76.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6481.6
Simplified81.6%
Final simplification77.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7.2e+83)
t
(if (<= z 1.95e-236)
(* t (/ y (- a z)))
(if (<= z 1.75e-19) (fma z (/ x a) x) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+83) {
tmp = t;
} else if (z <= 1.95e-236) {
tmp = t * (y / (a - z));
} else if (z <= 1.75e-19) {
tmp = fma(z, (x / a), x);
} else {
tmp = t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.2e+83) tmp = t; elseif (z <= 1.95e-236) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.75e-19) tmp = fma(z, Float64(x / a), x); else tmp = t; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+83], t, If[LessEqual[z, 1.95e-236], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-19], N[(z * N[(x / a), $MachinePrecision] + x), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+83}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-236}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.1999999999999995e83 or 1.75000000000000008e-19 < z Initial program 42.4%
Taylor expanded in z around inf
Simplified46.7%
if -7.1999999999999995e83 < z < 1.95e-236Initial program 82.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.3
Simplified43.3%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6441.2
Simplified41.2%
if 1.95e-236 < z < 1.75000000000000008e-19Initial program 97.8%
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--.f6471.9
Simplified71.9%
Taylor expanded in z around inf
Simplified52.5%
Taylor expanded in a around inf
/-lowering-/.f6454.4
Simplified54.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- y z) (/ (- t x) a) x))) (if (<= a -3.7) t_1 (if (<= a 3.2e-52) (+ t (* y (/ (- x t) 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 <= -3.7) {
tmp = t_1;
} else if (a <= 3.2e-52) {
tmp = t + (y * ((x - t) / 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 <= -3.7) tmp = t_1; elseif (a <= 3.2e-52) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / 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, -3.7], t$95$1, If[LessEqual[a, 3.2e-52], N[(t + N[(y * N[(N[(x - t), $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 -3.7:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.7000000000000002 or 3.2000000000000001e-52 < a Initial program 63.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--.f6472.4
Simplified72.4%
if -3.7000000000000002 < a < 3.2000000000000001e-52Initial program 68.7%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.2
Applied egg-rr76.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6481.6
Simplified81.6%
Taylor expanded in y around inf
Simplified77.6%
Final simplification75.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.4e+52)
t
(if (<= z -1.16e-127)
(/ (fma y x 0.0) z)
(if (<= z 6.6e-239) (* t (/ y a)) (if (<= z 1.7e-19) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+52) {
tmp = t;
} else if (z <= -1.16e-127) {
tmp = fma(y, x, 0.0) / z;
} else if (z <= 6.6e-239) {
tmp = t * (y / a);
} else if (z <= 1.7e-19) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+52) tmp = t; elseif (z <= -1.16e-127) tmp = Float64(fma(y, x, 0.0) / z); elseif (z <= 6.6e-239) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.7e-19) tmp = x; else tmp = t; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+52], t, If[LessEqual[z, -1.16e-127], N[(N[(y * x + 0.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.6e-239], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-19], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+52}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.16 \cdot 10^{-127}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, 0\right)}{z}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-239}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.4e52 or 1.7000000000000001e-19 < z Initial program 42.5%
Taylor expanded in z around inf
Simplified45.0%
if -2.4e52 < z < -1.16e-127Initial program 80.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--.f6452.3
Simplified52.3%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f6428.8
Simplified28.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
mul0-rgtN/A
accelerator-lowering-fma.f6432.7
Simplified32.7%
if -1.16e-127 < z < 6.5999999999999999e-239Initial program 88.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6445.8
Simplified45.8%
Taylor expanded in a around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6437.7
Simplified37.7%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.1
Applied egg-rr49.1%
Taylor expanded in y around inf
/-lowering-/.f6447.0
Simplified47.0%
if 6.5999999999999999e-239 < z < 1.7000000000000001e-19Initial program 97.8%
Taylor expanded in a around inf
Simplified52.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+51)
t
(if (<= z -3.8e-97)
(* x (/ y z))
(if (<= z 7.5e-234) (* t (/ y a)) (if (<= z 1.66e-19) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+51) {
tmp = t;
} else if (z <= -3.8e-97) {
tmp = x * (y / z);
} else if (z <= 7.5e-234) {
tmp = t * (y / a);
} else if (z <= 1.66e-19) {
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 <= (-8d+51)) then
tmp = t
else if (z <= (-3.8d-97)) then
tmp = x * (y / z)
else if (z <= 7.5d-234) then
tmp = t * (y / a)
else if (z <= 1.66d-19) 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 <= -8e+51) {
tmp = t;
} else if (z <= -3.8e-97) {
tmp = x * (y / z);
} else if (z <= 7.5e-234) {
tmp = t * (y / a);
} else if (z <= 1.66e-19) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+51: tmp = t elif z <= -3.8e-97: tmp = x * (y / z) elif z <= 7.5e-234: tmp = t * (y / a) elif z <= 1.66e-19: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+51) tmp = t; elseif (z <= -3.8e-97) tmp = Float64(x * Float64(y / z)); elseif (z <= 7.5e-234) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.66e-19) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8e+51) tmp = t; elseif (z <= -3.8e-97) tmp = x * (y / z); elseif (z <= 7.5e-234) tmp = t * (y / a); elseif (z <= 1.66e-19) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+51], t, If[LessEqual[z, -3.8e-97], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-234], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.66e-19], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+51}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-97}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-234}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.66 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8e51 or 1.65999999999999998e-19 < z Initial program 42.5%
Taylor expanded in z around inf
Simplified45.0%
if -8e51 < z < -3.8000000000000001e-97Initial program 83.4%
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.5
Simplified52.5%
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
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6432.4
Simplified32.4%
if -3.8000000000000001e-97 < z < 7.49999999999999996e-234Initial program 86.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6444.7
Simplified44.7%
Taylor expanded in a around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6435.8
Simplified35.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6445.9
Applied egg-rr45.9%
Taylor expanded in y around inf
/-lowering-/.f6444.1
Simplified44.1%
if 7.49999999999999996e-234 < z < 1.65999999999999998e-19Initial program 97.8%
Taylor expanded in a around inf
Simplified52.7%
Final simplification44.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ t a) (- y z) x))) (if (<= a -2400.0) t_1 (if (<= a 3.2e-52) (+ t (* y (/ (- x t) z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t / a), (y - z), x);
double tmp;
if (a <= -2400.0) {
tmp = t_1;
} else if (a <= 3.2e-52) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t / a), Float64(y - z), x) tmp = 0.0 if (a <= -2400.0) tmp = t_1; elseif (a <= 3.2e-52) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2400.0], t$95$1, If[LessEqual[a, 3.2e-52], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\
\mathbf{if}\;a \leq -2400:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2400 or 3.2000000000000001e-52 < a Initial program 63.8%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6486.7
Applied egg-rr86.7%
Taylor expanded in a around inf
Simplified72.4%
Taylor expanded in t around inf
Simplified65.1%
if -2400 < a < 3.2000000000000001e-52Initial program 68.7%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.2
Applied egg-rr76.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6481.6
Simplified81.6%
Taylor expanded in y around inf
Simplified77.6%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ t a) (- y z) x))) (if (<= a -920.0) t_1 (if (<= a 3.2e-52) (fma (- x t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t / a), (y - z), x);
double tmp;
if (a <= -920.0) {
tmp = t_1;
} else if (a <= 3.2e-52) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t / a), Float64(y - z), x) tmp = 0.0 if (a <= -920.0) tmp = t_1; elseif (a <= 3.2e-52) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -920.0], t$95$1, If[LessEqual[a, 3.2e-52], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\
\mathbf{if}\;a \leq -920:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -920 or 3.2000000000000001e-52 < a Initial program 63.8%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6486.7
Applied egg-rr86.7%
Taylor expanded in a around inf
Simplified72.4%
Taylor expanded in t around inf
Simplified65.1%
if -920 < a < 3.2000000000000001e-52Initial program 68.7%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.2
Applied egg-rr76.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6481.6
Simplified81.6%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.2
Simplified76.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -330.0) (fma y (/ (- t x) a) x) (if (<= a 3.2e-52) (fma (- x t) (/ y z) t) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -330.0) {
tmp = fma(y, ((t - x) / a), x);
} else if (a <= 3.2e-52) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -330.0) tmp = fma(y, Float64(Float64(t - x) / a), x); elseif (a <= 3.2e-52) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -330.0], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 3.2e-52], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -330:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -330Initial program 65.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.5
Simplified66.5%
if -330 < a < 3.2000000000000001e-52Initial program 68.7%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.2
Applied egg-rr76.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6481.6
Simplified81.6%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
neg-mul-1N/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.2
Simplified76.2%
if 3.2000000000000001e-52 < a Initial program 61.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6488.3
Applied egg-rr88.3%
Taylor expanded in z around 0
/-lowering-/.f6460.6
Simplified60.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t x) (/ a z) t))) (if (<= z -2.8e+72) t_1 (if (<= z 5e+63) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), (a / z), t);
double tmp;
if (z <= -2.8e+72) {
tmp = t_1;
} else if (z <= 5e+63) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(a / z), t) tmp = 0.0 if (z <= -2.8e+72) tmp = t_1; elseif (z <= 5e+63) 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[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.8e+72], t$95$1, If[LessEqual[z, 5e+63], 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(t - x, \frac{a}{z}, t\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7999999999999999e72 or 5.00000000000000011e63 < z Initial program 33.1%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6465.6
Applied egg-rr65.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6482.3
Simplified82.3%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6461.4
Simplified61.4%
if -2.7999999999999999e72 < z < 5.00000000000000011e63Initial program 87.2%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.4
Applied egg-rr92.4%
Taylor expanded in z around 0
/-lowering-/.f6464.9
Simplified64.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t x) (/ a z) t))) (if (<= z -2.2e+77) t_1 (if (<= z 9.6e+63) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), (a / z), t);
double tmp;
if (z <= -2.2e+77) {
tmp = t_1;
} else if (z <= 9.6e+63) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(a / z), t) tmp = 0.0 if (z <= -2.2e+77) tmp = t_1; elseif (z <= 9.6e+63) 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[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.2e+77], t$95$1, If[LessEqual[z, 9.6e+63], 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(t - x, \frac{a}{z}, t\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.2e77 or 9.6e63 < z Initial program 33.1%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6465.6
Applied egg-rr65.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6482.3
Simplified82.3%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6461.4
Simplified61.4%
if -2.2e77 < z < 9.6e63Initial program 87.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.1
Simplified63.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+74) t (if (<= z 8.5e+63) (fma y (/ (- t x) a) x) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+74) {
tmp = t;
} else if (z <= 8.5e+63) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+74) tmp = t; elseif (z <= 8.5e+63) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+74], t, If[LessEqual[z, 8.5e+63], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+74}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.9999999999999999e74 or 8.5000000000000004e63 < z Initial program 33.1%
Taylor expanded in z around inf
Simplified50.1%
if -8.9999999999999999e74 < z < 8.5000000000000004e63Initial program 87.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.1
Simplified63.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.75e+72) t (if (<= z 7e-233) (* t (/ y a)) (if (<= z 2e-19) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+72) {
tmp = t;
} else if (z <= 7e-233) {
tmp = t * (y / a);
} else if (z <= 2e-19) {
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 <= (-1.75d+72)) then
tmp = t
else if (z <= 7d-233) then
tmp = t * (y / a)
else if (z <= 2d-19) 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 <= -1.75e+72) {
tmp = t;
} else if (z <= 7e-233) {
tmp = t * (y / a);
} else if (z <= 2e-19) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+72: tmp = t elif z <= 7e-233: tmp = t * (y / a) elif z <= 2e-19: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+72) tmp = t; elseif (z <= 7e-233) tmp = Float64(t * Float64(y / a)); elseif (z <= 2e-19) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e+72) tmp = t; elseif (z <= 7e-233) tmp = t * (y / a); elseif (z <= 2e-19) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+72], t, If[LessEqual[z, 7e-233], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-19], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-233}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.75000000000000005e72 or 2e-19 < z Initial program 42.4%
Taylor expanded in z around inf
Simplified46.7%
if -1.75000000000000005e72 < z < 6.99999999999999982e-233Initial program 82.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.3
Simplified43.3%
Taylor expanded in a around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6430.4
Simplified30.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6437.5
Applied egg-rr37.5%
Taylor expanded in y around inf
/-lowering-/.f6432.6
Simplified32.6%
if 6.99999999999999982e-233 < z < 2e-19Initial program 97.8%
Taylor expanded in a around inf
Simplified52.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.6e+72) t (if (<= z 1.55e-19) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+72) {
tmp = t;
} else if (z <= 1.55e-19) {
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 <= (-9.6d+72)) then
tmp = t
else if (z <= 1.55d-19) 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 <= -9.6e+72) {
tmp = t;
} else if (z <= 1.55e-19) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.6e+72: tmp = t elif z <= 1.55e-19: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+72) tmp = t; elseif (z <= 1.55e-19) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.6e+72) tmp = t; elseif (z <= 1.55e-19) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+72], t, If[LessEqual[z, 1.55e-19], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.6000000000000004e72 or 1.5499999999999999e-19 < z Initial program 42.4%
Taylor expanded in z around inf
Simplified46.7%
if -9.6000000000000004e72 < z < 1.5499999999999999e-19Initial program 87.3%
Taylor expanded in a around inf
Simplified32.3%
(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 66.2%
Taylor expanded in z around inf
Simplified25.6%
(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 66.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--.f6438.9
Simplified38.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 2024205
(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))))