
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 -5e-299)
(+ x (/ (- y x) (/ (- a t) (- z t))))
(if (<= t_1 0.0)
(fma (- x y) (/ (- z a) t) y)
(fma (/ (- z t) (- a t)) (- y x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -5e-299) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} else if (t_1 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = fma(((z - t) / (a - t)), (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -5e-299) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); elseif (t_1 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-299], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-299}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999956e-299Initial program 73.2%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.4
Applied egg-rr92.4%
if -4.99999999999999956e-299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.8%
Taylor expanded in t 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
Simplified99.9%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 73.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6489.8
Applied egg-rr89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z t) (- a t)) (- y x) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-299)
t_1
(if (<= t_2 0.0) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - t) / (a - t)), (y - x), x);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-299) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-299) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-299], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999956e-299 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 73.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6490.9
Applied egg-rr90.9%
if -4.99999999999999956e-299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.8%
Taylor expanded in t 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
Simplified99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -8e+40)
t_1
(if (<= t -2.45e-28)
(fma (- x) (/ z (- a t)) x)
(if (<= t 5.4e-48) (+ x (/ (* (- y x) z) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -8e+40) {
tmp = t_1;
} else if (t <= -2.45e-28) {
tmp = fma(-x, (z / (a - t)), x);
} else if (t <= 5.4e-48) {
tmp = x + (((y - x) * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -8e+40) tmp = t_1; elseif (t <= -2.45e-28) tmp = fma(Float64(-x), Float64(z / Float64(a - t)), x); elseif (t <= 5.4e-48) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e+40], t$95$1, If[LessEqual[t, -2.45e-28], N[((-x) * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 5.4e-48], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -8 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.45 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a - t}, x\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-48}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.00000000000000024e40 or 5.40000000000000023e-48 < t Initial program 37.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6438.7
Simplified38.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6467.1
Applied egg-rr67.1%
if -8.00000000000000024e40 < t < -2.45000000000000015e-28Initial program 83.1%
*-commutativeN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
--lowering--.f6483.1
Applied egg-rr83.1%
Taylor expanded in z around inf
Simplified67.1%
Taylor expanded in z around inf
Simplified69.2%
Taylor expanded in x around inf
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.9
Simplified63.9%
if -2.45000000000000015e-28 < t < 5.40000000000000023e-48Initial program 90.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6472.5
Simplified72.5%
Final simplification69.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9e+45)
(fma y (/ (- z) t) y)
(if (<= t 5.2e-86)
(fma z (/ (- y x) a) x)
(if (<= t 6.1e+140) (fma t (/ (- x y) a) x) (fma a (/ (- y x) t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e+45) {
tmp = fma(y, (-z / t), y);
} else if (t <= 5.2e-86) {
tmp = fma(z, ((y - x) / a), x);
} else if (t <= 6.1e+140) {
tmp = fma(t, ((x - y) / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e+45) tmp = fma(y, Float64(Float64(-z) / t), y); elseif (t <= 5.2e-86) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (t <= 6.1e+140) tmp = fma(t, Float64(Float64(x - y) / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e+45], N[(y * N[((-z) / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 5.2e-86], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 6.1e+140], N[(t * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{-z}{t}, y\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-86}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{+140}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x - y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -8.9999999999999997e45Initial program 36.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6436.5
Simplified36.5%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6460.5
Simplified60.5%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6460.5
Simplified60.5%
if -8.9999999999999997e45 < t < 5.2000000000000002e-86Initial program 88.5%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.1
Simplified69.1%
if 5.2000000000000002e-86 < t < 6.0999999999999996e140Initial program 73.8%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/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--.f6455.8
Simplified55.8%
Taylor expanded in t around 0
+-commutativeN/A
div-subN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.5
Simplified59.5%
if 6.0999999999999996e140 < t Initial program 23.8%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/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--.f6442.8
Simplified42.8%
Taylor expanded in a around 0
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
associate-+l+N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
div-subN/A
associate-/l*N/A
Simplified66.8%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a (/ (- y x) t) y)))
(if (<= t -6.5e+106)
t_1
(if (<= t 9e-86)
(+ x (/ (* y z) a))
(if (<= t 6.1e+140) (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) / t), y);
double tmp;
if (t <= -6.5e+106) {
tmp = t_1;
} else if (t <= 9e-86) {
tmp = x + ((y * z) / a);
} else if (t <= 6.1e+140) {
tmp = fma(t, ((x - y) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(y - x) / t), y) tmp = 0.0 if (t <= -6.5e+106) tmp = t_1; elseif (t <= 9e-86) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (t <= 6.1e+140) tmp = fma(t, Float64(Float64(x - y) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -6.5e+106], t$95$1, If[LessEqual[t, 9e-86], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.1e+140], N[(t * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-86}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{+140}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x - y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5000000000000003e106 or 6.0999999999999996e140 < t Initial program 28.3%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/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
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
associate-+l+N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
div-subN/A
associate-/l*N/A
Simplified67.3%
if -6.5000000000000003e106 < t < 8.9999999999999995e-86Initial program 85.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.3
Applied egg-rr91.3%
Taylor expanded in t around 0
/-lowering-/.f6469.0
Simplified69.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6457.4
Simplified57.4%
if 8.9999999999999995e-86 < t < 6.0999999999999996e140Initial program 73.8%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/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--.f6455.8
Simplified55.8%
Taylor expanded in t around 0
+-commutativeN/A
div-subN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6459.5
Simplified59.5%
Final simplification60.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.25e+63)
t_1
(if (<= t 1.6e+141) (fma (- z t) (/ (- y x) (- a t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -1.25e+63) {
tmp = t_1;
} else if (t <= 1.6e+141) {
tmp = fma((z - t), ((y - x) / (a - t)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -1.25e+63) tmp = t_1; elseif (t <= 1.6e+141) tmp = fma(Float64(z - t), Float64(Float64(y - x) / Float64(a - t)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.25e+63], t$95$1, If[LessEqual[t, 1.6e+141], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+141}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.25000000000000003e63 or 1.60000000000000009e141 < t Initial program 29.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified84.6%
if -1.25000000000000003e63 < t < 1.60000000000000009e141Initial program 86.2%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6488.6
Applied egg-rr88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- y x) a) x)))
(if (<= a -1e-72)
t_1
(if (<= a 1.15e+21) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), ((y - x) / a), x);
double tmp;
if (a <= -1e-72) {
tmp = t_1;
} else if (a <= 1.15e+21) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(Float64(y - x) / a), x) tmp = 0.0 if (a <= -1e-72) tmp = t_1; elseif (a <= 1.15e+21) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1e-72], t$95$1, If[LessEqual[a, 1.15e+21], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{if}\;a \leq -1 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.9999999999999997e-73 or 1.15e21 < a Initial program 73.6%
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--.f6475.1
Simplified75.1%
if -9.9999999999999997e-73 < a < 1.15e21Initial program 60.7%
Taylor expanded in t 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
Simplified78.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ y a) x)))
(if (<= a -2.9e+61)
t_1
(if (<= a 3.8e+19) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), (y / a), x);
double tmp;
if (a <= -2.9e+61) {
tmp = t_1;
} else if (a <= 3.8e+19) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(y / a), x) tmp = 0.0 if (a <= -2.9e+61) tmp = t_1; elseif (a <= 3.8e+19) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.9e+61], t$95$1, If[LessEqual[a, 3.8e+19], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.9000000000000001e61 or 3.8e19 < a Initial program 73.6%
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--.f6480.1
Simplified80.1%
Taylor expanded in y around inf
Simplified74.9%
if -2.9000000000000001e61 < a < 3.8e19Initial program 62.9%
Taylor expanded in t 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
Simplified73.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -3.7e+43)
t_1
(if (<= t 2.95e-47) (+ x (/ (* (- y x) z) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -3.7e+43) {
tmp = t_1;
} else if (t <= 2.95e-47) {
tmp = x + (((y - x) * z) / a);
} 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 = y * ((z - t) / (a - t))
if (t <= (-3.7d+43)) then
tmp = t_1
else if (t <= 2.95d-47) then
tmp = x + (((y - x) * z) / a)
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 = y * ((z - t) / (a - t));
double tmp;
if (t <= -3.7e+43) {
tmp = t_1;
} else if (t <= 2.95e-47) {
tmp = x + (((y - x) * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if t <= -3.7e+43: tmp = t_1 elif t <= 2.95e-47: tmp = x + (((y - x) * z) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -3.7e+43) tmp = t_1; elseif (t <= 2.95e-47) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -3.7e+43) tmp = t_1; elseif (t <= 2.95e-47) tmp = x + (((y - x) * z) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+43], t$95$1, If[LessEqual[t, 2.95e-47], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.7000000000000001e43 or 2.94999999999999986e-47 < t Initial program 37.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6438.7
Simplified38.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6467.1
Applied egg-rr67.1%
if -3.7000000000000001e43 < t < 2.94999999999999986e-47Initial program 89.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6468.2
Simplified68.2%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ (- z t) (- a t))))) (if (<= t -4.3e+42) t_1 (if (<= t 7e-50) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -4.3e+42) {
tmp = t_1;
} else if (t <= 7e-50) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -4.3e+42) tmp = t_1; elseif (t <= 7e-50) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e+42], t$95$1, If[LessEqual[t, 7e-50], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-50}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.2999999999999998e42 or 6.99999999999999993e-50 < t Initial program 37.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6438.7
Simplified38.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6467.1
Applied egg-rr67.1%
if -4.2999999999999998e42 < t < 6.99999999999999993e-50Initial program 89.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.7
Simplified67.7%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- y x) t) y))) (if (<= t -1.4e+106) t_1 (if (<= t 6.1e+140) (+ x (/ (* y z) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((y - x) / t), y);
double tmp;
if (t <= -1.4e+106) {
tmp = t_1;
} else if (t <= 6.1e+140) {
tmp = x + ((y * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(y - x) / t), y) tmp = 0.0 if (t <= -1.4e+106) tmp = t_1; elseif (t <= 6.1e+140) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.4e+106], t$95$1, If[LessEqual[t, 6.1e+140], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.39999999999999996e106 or 6.0999999999999996e140 < t Initial program 28.3%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/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
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
associate-+l+N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
div-subN/A
associate-/l*N/A
Simplified67.3%
if -1.39999999999999996e106 < t < 6.0999999999999996e140Initial program 83.8%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.0
Applied egg-rr91.0%
Taylor expanded in t around 0
/-lowering-/.f6464.8
Simplified64.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6454.0
Simplified54.0%
Final simplification58.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ (- z) t) y))) (if (<= t -1.6e+46) t_1 (if (<= t 5e+109) (+ x (/ (* y z) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (-z / t), y);
double tmp;
if (t <= -1.6e+46) {
tmp = t_1;
} else if (t <= 5e+109) {
tmp = x + ((y * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(-z) / t), y) tmp = 0.0 if (t <= -1.6e+46) tmp = t_1; elseif (t <= 5e+109) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-z) / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.6e+46], t$95$1, If[LessEqual[t, 5e+109], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{-z}{t}, y\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+109}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.5999999999999999e46 or 5.0000000000000001e109 < t Initial program 31.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6437.1
Simplified37.1%
Taylor expanded in a around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f6460.7
Simplified60.7%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6460.7
Simplified60.7%
if -1.5999999999999999e46 < t < 5.0000000000000001e109Initial program 87.9%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.4
Applied egg-rr92.4%
Taylor expanded in t around 0
/-lowering-/.f6467.7
Simplified67.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6456.3
Simplified56.3%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -8e+61) y (if (<= t 2.25e+111) (+ x (/ (* y z) a)) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+61) {
tmp = y;
} else if (t <= 2.25e+111) {
tmp = x + ((y * z) / a);
} else {
tmp = 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 (t <= (-8d+61)) then
tmp = y
else if (t <= 2.25d+111) then
tmp = x + ((y * z) / a)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+61) {
tmp = y;
} else if (t <= 2.25e+111) {
tmp = x + ((y * z) / a);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8e+61: tmp = y elif t <= 2.25e+111: tmp = x + ((y * z) / a) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e+61) tmp = y; elseif (t <= 2.25e+111) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8e+61) tmp = y; elseif (t <= 2.25e+111) tmp = x + ((y * z) / a); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+61], y, If[LessEqual[t, 2.25e+111], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+61}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+111}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.9999999999999996e61 or 2.25e111 < t Initial program 29.0%
Taylor expanded in t around inf
Simplified54.9%
if -7.9999999999999996e61 < t < 2.25e111Initial program 88.1%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.6
Applied egg-rr92.6%
Taylor expanded in t around 0
/-lowering-/.f6467.1
Simplified67.1%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6456.0
Simplified56.0%
Final simplification55.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.6e+45) y (if (<= t 6.1e+140) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+45) {
tmp = y;
} else if (t <= 6.1e+140) {
tmp = x;
} else {
tmp = 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 (t <= (-5.6d+45)) then
tmp = y
else if (t <= 6.1d+140) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+45) {
tmp = y;
} else if (t <= 6.1e+140) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e+45: tmp = y elif t <= 6.1e+140: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e+45) tmp = y; elseif (t <= 6.1e+140) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e+45) tmp = y; elseif (t <= 6.1e+140) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e+45], y, If[LessEqual[t, 6.1e+140], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+45}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{+140}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.5999999999999999e45 or 6.0999999999999996e140 < t Initial program 31.6%
Taylor expanded in t around inf
Simplified56.2%
if -5.5999999999999999e45 < t < 6.0999999999999996e140Initial program 86.0%
Taylor expanded in a around inf
Simplified38.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 67.3%
Taylor expanded in a around inf
Simplified28.8%
(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 67.3%
*-commutativeN/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
--lowering--.f6466.9
Applied egg-rr66.9%
Taylor expanded in z around inf
Simplified56.5%
Taylor expanded in t around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lft2.8
Simplified2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024198
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))