
(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 19 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 (fma (/ (- z t) (- a t)) (- y x) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-207)
t_1
(if (<= t_2 0.0)
(+ y (/ (fma a (* (/ (- x y) t) (- z a)) (* (- y x) (- a z))) t))
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-207) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (fma(a, (((x - y) / t) * (z - a)), ((y - x) * (a - z))) / t);
} 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-207) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(fma(a, Float64(Float64(Float64(x - y) / t) * Float64(z - a)), Float64(Float64(y - x) * Float64(a - z))) / t)); 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-207], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(a * N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $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^{-207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\mathsf{fma}\left(a, \frac{x - y}{t} \cdot \left(z - a\right), \left(y - x\right) \cdot \left(a - z\right)\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000014e-207 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 71.3%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6491.2
Applied egg-rr91.2%
if -5.00000000000000014e-207 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.5%
Taylor expanded in t around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified99.8%
Final simplification91.7%
(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-207)
t_1
(if (<= t_2 0.0) (+ y (* (- y x) (/ (- a z) t))) 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-207) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + ((y - x) * ((a - z) / t));
} 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-207) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); 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-207], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $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^{-207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000014e-207 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 71.3%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6491.2
Applied egg-rr91.2%
if -5.00000000000000014e-207 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.5%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f644.8
Applied egg-rr4.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt-out--N/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.7
Simplified99.7%
Final simplification91.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z t)))))
(if (<= t -1.15e+104)
t_1
(if (<= t -4.15e-175)
(fma t (/ (- x y) a) x)
(if (<= t -3e-298)
(* x (- 1.0 (/ z a)))
(if (<= t 6.2e-78)
(fma (/ z a) y x)
(if (<= t 1.15e+116) (/ (* z (- x y)) t) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -1.15e+104) {
tmp = t_1;
} else if (t <= -4.15e-175) {
tmp = fma(t, ((x - y) / a), x);
} else if (t <= -3e-298) {
tmp = x * (1.0 - (z / a));
} else if (t <= 6.2e-78) {
tmp = fma((z / a), y, x);
} else if (t <= 1.15e+116) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -1.15e+104) tmp = t_1; elseif (t <= -4.15e-175) tmp = fma(t, Float64(Float64(x - y) / a), x); elseif (t <= -3e-298) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (t <= 6.2e-78) tmp = fma(Float64(z / a), y, x); elseif (t <= 1.15e+116) tmp = Float64(Float64(z * Float64(x - y)) / t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+104], t$95$1, If[LessEqual[t, -4.15e-175], N[(t * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, -3e-298], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-78], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 1.15e+116], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.15 \cdot 10^{-175}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x - y}{a}, x\right)\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-298}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+116}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.14999999999999992e104 or 1.14999999999999997e116 < t Initial program 33.3%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6450.8
Simplified50.8%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6453.2
Simplified53.2%
if -1.14999999999999992e104 < t < -4.15000000000000026e-175Initial program 77.9%
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--.f6454.2
Simplified54.2%
Taylor expanded in t around 0
+-commutativeN/A
div-subN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6455.6
Simplified55.6%
if -4.15000000000000026e-175 < t < -2.9999999999999999e-298Initial program 99.8%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6496.5
Applied egg-rr96.5%
Taylor expanded in t around 0
/-lowering-/.f6492.8
Simplified92.8%
Taylor expanded in y around 0
mul-1-negN/A
*-rgt-identityN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6486.2
Simplified86.2%
if -2.9999999999999999e-298 < t < 6.20000000000000035e-78Initial program 82.8%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6496.0
Applied egg-rr96.0%
Taylor expanded in y around inf
Simplified83.0%
Taylor expanded in t around 0
/-lowering-/.f6477.1
Simplified77.1%
if 6.20000000000000035e-78 < t < 1.14999999999999997e116Initial program 83.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6458.9
Simplified58.9%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6449.7
Simplified49.7%
Final simplification61.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z t)))))
(if (<= t -3.9e+131)
t_1
(if (<= t 3.4e-94)
(fma z (/ (- y x) a) x)
(if (<= t 2.1e+168) (fma (- x y) (/ z t) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -3.9e+131) {
tmp = t_1;
} else if (t <= 3.4e-94) {
tmp = fma(z, ((y - x) / a), x);
} else if (t <= 2.1e+168) {
tmp = fma((x - y), (z / t), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -3.9e+131) tmp = t_1; elseif (t <= 3.4e-94) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (t <= 2.1e+168) tmp = fma(Float64(x - y), Float64(z / t), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e+131], t$95$1, If[LessEqual[t, 3.4e-94], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 2.1e+168], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-94}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+168}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.9e131 or 2.10000000000000003e168 < t Initial program 29.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6457.9
Simplified57.9%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6461.5
Simplified61.5%
if -3.9e131 < t < 3.3999999999999998e-94Initial program 81.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.4
Simplified74.4%
if 3.3999999999999998e-94 < t < 2.10000000000000003e168Initial program 75.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6450.0
Simplified50.0%
Taylor expanded in z around inf
/-lowering-/.f6455.1
Simplified55.1%
Final simplification67.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (- y x) (/ (- a z) t)))))
(if (<= t -3.7e+144)
t_1
(if (<= t 4e+166) (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 = y + ((y - x) * ((a - z) / t));
double tmp;
if (t <= -3.7e+144) {
tmp = t_1;
} else if (t <= 4e+166) {
tmp = fma((z - t), ((y - x) / (a - t)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))) tmp = 0.0 if (t <= -3.7e+144) tmp = t_1; elseif (t <= 4e+166) 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[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+144], t$95$1, If[LessEqual[t, 4e+166], 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 := y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+166}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.6999999999999997e144 or 3.99999999999999976e166 < t Initial program 29.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6469.3
Applied egg-rr69.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt-out--N/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6489.4
Simplified89.4%
if -3.6999999999999997e144 < t < 3.99999999999999976e166Initial program 80.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.5
Applied egg-rr91.5%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z t)))))
(if (<= t -2.25e+128)
t_1
(if (<= t 7.2e-78)
(fma (/ z a) y x)
(if (<= t 9e+118) (/ (* z (- x y)) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -2.25e+128) {
tmp = t_1;
} else if (t <= 7.2e-78) {
tmp = fma((z / a), y, x);
} else if (t <= 9e+118) {
tmp = (z * (x - y)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -2.25e+128) tmp = t_1; elseif (t <= 7.2e-78) tmp = fma(Float64(z / a), y, x); elseif (t <= 9e+118) tmp = Float64(Float64(z * Float64(x - y)) / t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+128], t$95$1, If[LessEqual[t, 7.2e-78], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 9e+118], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+118}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.2500000000000001e128 or 9.00000000000000004e118 < t Initial program 31.5%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.6
Simplified52.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6455.2
Simplified55.2%
if -2.2500000000000001e128 < t < 7.2000000000000005e-78Initial program 83.3%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.7
Applied egg-rr92.7%
Taylor expanded in y around inf
Simplified75.2%
Taylor expanded in t around 0
/-lowering-/.f6461.4
Simplified61.4%
if 7.2000000000000005e-78 < t < 9.00000000000000004e118Initial program 83.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6458.9
Simplified58.9%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6449.7
Simplified49.7%
Final simplification57.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.2e+131)
y
(if (<= t 6.5e-49)
(fma (/ z a) y x)
(if (<= t 3.2e+168) (* x (/ (- z a) t)) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+131) {
tmp = y;
} else if (t <= 6.5e-49) {
tmp = fma((z / a), y, x);
} else if (t <= 3.2e+168) {
tmp = x * ((z - a) / t);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.2e+131) tmp = y; elseif (t <= 6.5e-49) tmp = fma(Float64(z / a), y, x); elseif (t <= 3.2e+168) tmp = Float64(x * Float64(Float64(z - a) / t)); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+131], y, If[LessEqual[t, 6.5e-49], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 3.2e+168], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+131}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-49}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+168}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.19999999999999971e131 or 3.2000000000000001e168 < t Initial program 29.2%
Taylor expanded in t around inf
Simplified51.0%
if -4.19999999999999971e131 < t < 6.49999999999999968e-49Initial program 82.7%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6493.0
Applied egg-rr93.0%
Taylor expanded in y around inf
Simplified76.2%
Taylor expanded in t around 0
/-lowering-/.f6461.0
Simplified61.0%
if 6.49999999999999968e-49 < t < 3.2000000000000001e168Initial program 70.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
Simplified63.2%
Taylor expanded in x around inf
div-subN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6439.4
Simplified39.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.5e+131)
y
(if (<= t 5.5e-25)
(fma (/ z a) y x)
(if (<= t 1e+162) (* x (- 1.0 (/ z a))) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.5e+131) {
tmp = y;
} else if (t <= 5.5e-25) {
tmp = fma((z / a), y, x);
} else if (t <= 1e+162) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.5e+131) tmp = y; elseif (t <= 5.5e-25) tmp = fma(Float64(z / a), y, x); elseif (t <= 1e+162) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.5e+131], y, If[LessEqual[t, 5.5e-25], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 1e+162], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+131}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\mathbf{elif}\;t \leq 10^{+162}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.4999999999999999e131 or 9.9999999999999994e161 < t Initial program 30.9%
Taylor expanded in t around inf
Simplified48.9%
if -3.4999999999999999e131 < t < 5.50000000000000004e-25Initial program 82.6%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.5
Applied egg-rr92.5%
Taylor expanded in y around inf
Simplified75.1%
Taylor expanded in t around 0
/-lowering-/.f6459.1
Simplified59.1%
if 5.50000000000000004e-25 < t < 9.9999999999999994e161Initial program 69.7%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6483.5
Applied egg-rr83.5%
Taylor expanded in t around 0
/-lowering-/.f6444.9
Simplified44.9%
Taylor expanded in y around 0
mul-1-negN/A
*-rgt-identityN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6442.8
Simplified42.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (- y x) (/ (- a z) t)))))
(if (<= t -27000000000.0)
t_1
(if (<= t 7.2e-78) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((y - x) * ((a - z) / t));
double tmp;
if (t <= -27000000000.0) {
tmp = t_1;
} else if (t <= 7.2e-78) {
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(y - x) * Float64(Float64(a - z) / t))) tmp = 0.0 if (t <= -27000000000.0) tmp = t_1; elseif (t <= 7.2e-78) 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[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -27000000000.0], t$95$1, If[LessEqual[t, 7.2e-78], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{if}\;t \leq -27000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.7e10 or 7.2000000000000005e-78 < t Initial program 49.4%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6477.9
Applied egg-rr77.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt-out--N/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.5
Simplified73.5%
if -2.7e10 < t < 7.2000000000000005e-78Initial program 89.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.0
Simplified84.0%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -210000000000.0)
t_1
(if (<= t 7e-78) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -210000000000.0) {
tmp = t_1;
} else if (t <= 7e-78) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -210000000000.0) tmp = t_1; elseif (t <= 7e-78) 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[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -210000000000.0], t$95$1, If[LessEqual[t, 7e-78], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -210000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.1e11 or 6.9999999999999999e-78 < t Initial program 49.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
Simplified70.2%
if -2.1e11 < t < 6.9999999999999999e-78Initial program 89.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.0
Simplified84.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.45e+126)
y
(if (<= t -3.2e-287)
x
(if (<= t 2e-113) (* y (/ z a)) (if (<= t 7.2e+30) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.45e+126) {
tmp = y;
} else if (t <= -3.2e-287) {
tmp = x;
} else if (t <= 2e-113) {
tmp = y * (z / a);
} else if (t <= 7.2e+30) {
tmp = x;
} else {
tmp = x + 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 <= (-1.45d+126)) then
tmp = y
else if (t <= (-3.2d-287)) then
tmp = x
else if (t <= 2d-113) then
tmp = y * (z / a)
else if (t <= 7.2d+30) then
tmp = x
else
tmp = x + 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 <= -1.45e+126) {
tmp = y;
} else if (t <= -3.2e-287) {
tmp = x;
} else if (t <= 2e-113) {
tmp = y * (z / a);
} else if (t <= 7.2e+30) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.45e+126: tmp = y elif t <= -3.2e-287: tmp = x elif t <= 2e-113: tmp = y * (z / a) elif t <= 7.2e+30: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.45e+126) tmp = y; elseif (t <= -3.2e-287) tmp = x; elseif (t <= 2e-113) tmp = Float64(y * Float64(z / a)); elseif (t <= 7.2e+30) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.45e+126) tmp = y; elseif (t <= -3.2e-287) tmp = x; elseif (t <= 2e-113) tmp = y * (z / a); elseif (t <= 7.2e+30) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.45e+126], y, If[LessEqual[t, -3.2e-287], x, If[LessEqual[t, 2e-113], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+30], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+126}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-287}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-113}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.44999999999999993e126Initial program 25.3%
Taylor expanded in t around inf
Simplified52.5%
if -1.44999999999999993e126 < t < -3.20000000000000018e-287 or 1.99999999999999996e-113 < t < 7.2000000000000004e30Initial program 84.6%
Taylor expanded in a around inf
Simplified40.0%
if -3.20000000000000018e-287 < t < 1.99999999999999996e-113Initial program 80.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6442.8
Simplified42.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6453.3
Applied egg-rr53.3%
Taylor expanded in t around 0
/-lowering-/.f6448.0
Simplified48.0%
if 7.2000000000000004e30 < t Initial program 49.7%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6480.8
Applied egg-rr80.8%
Taylor expanded in y around inf
Simplified56.2%
Taylor expanded in t around inf
+-lowering-+.f6432.9
Simplified32.9%
Final simplification42.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ z t) y)))
(if (<= t -57000000000.0)
t_1
(if (<= t 7.2e-78) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -57000000000.0) {
tmp = t_1;
} else if (t <= 7.2e-78) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -57000000000.0) tmp = t_1; elseif (t <= 7.2e-78) 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[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -57000000000.0], t$95$1, If[LessEqual[t, 7.2e-78], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -57000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.7e10 or 7.2000000000000005e-78 < t Initial program 49.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
Simplified70.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6464.9
Simplified64.9%
if -5.7e10 < t < 7.2000000000000005e-78Initial program 89.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.0
Simplified84.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ z t))))) (if (<= t -3.9e+131) t_1 (if (<= t 4.6e+111) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -3.9e+131) {
tmp = t_1;
} else if (t <= 4.6e+111) {
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(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -3.9e+131) tmp = t_1; elseif (t <= 4.6e+111) 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[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e+131], t$95$1, If[LessEqual[t, 4.6e+111], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.9e131 or 4.60000000000000004e111 < t Initial program 33.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6453.2
Simplified53.2%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6454.6
Simplified54.6%
if -3.9e131 < t < 4.60000000000000004e111Initial program 82.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.3
Simplified69.3%
Final simplification64.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ z t))))) (if (<= t -1.02e+126) t_1 (if (<= t 1.35e-78) (fma (/ z a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -1.02e+126) {
tmp = t_1;
} else if (t <= 1.35e-78) {
tmp = fma((z / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -1.02e+126) tmp = t_1; elseif (t <= 1.35e-78) tmp = fma(Float64(z / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e+126], t$95$1, If[LessEqual[t, 1.35e-78], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.02e126 or 1.34999999999999997e-78 < t Initial program 46.8%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6454.5
Simplified54.5%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6449.5
Simplified49.5%
if -1.02e126 < t < 1.34999999999999997e-78Initial program 83.3%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.7
Applied egg-rr92.7%
Taylor expanded in y around inf
Simplified75.2%
Taylor expanded in t around 0
/-lowering-/.f6461.4
Simplified61.4%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.5e+131) y (if (<= t 1.7e+33) (fma (/ z a) y x) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.5e+131) {
tmp = y;
} else if (t <= 1.7e+33) {
tmp = fma((z / a), y, x);
} else {
tmp = x + y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.5e+131) tmp = y; elseif (t <= 1.7e+33) tmp = fma(Float64(z / a), y, x); else tmp = Float64(x + y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.5e+131], y, If[LessEqual[t, 1.7e+33], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+131}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.4999999999999999e131Initial program 26.2%
Taylor expanded in t around inf
Simplified52.6%
if -3.4999999999999999e131 < t < 1.7e33Initial program 82.6%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6491.9
Applied egg-rr91.9%
Taylor expanded in y around inf
Simplified73.9%
Taylor expanded in t around 0
/-lowering-/.f6457.7
Simplified57.7%
if 1.7e33 < t Initial program 49.7%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6480.8
Applied egg-rr80.8%
Taylor expanded in y around inf
Simplified56.2%
Taylor expanded in t around inf
+-lowering-+.f6432.9
Simplified32.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* x (/ z t)))) (if (<= z -8.5e+72) t_1 (if (<= z 112000000.0) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (z / t);
double tmp;
if (z <= -8.5e+72) {
tmp = t_1;
} else if (z <= 112000000.0) {
tmp = x + y;
} 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 * (z / t)
if (z <= (-8.5d+72)) then
tmp = t_1
else if (z <= 112000000.0d0) then
tmp = x + y
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 * (z / t);
double tmp;
if (z <= -8.5e+72) {
tmp = t_1;
} else if (z <= 112000000.0) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (z / t) tmp = 0 if z <= -8.5e+72: tmp = t_1 elif z <= 112000000.0: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(z / t)) tmp = 0.0 if (z <= -8.5e+72) tmp = t_1; elseif (z <= 112000000.0) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (z / t); tmp = 0.0; if (z <= -8.5e+72) tmp = t_1; elseif (z <= 112000000.0) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+72], t$95$1, If[LessEqual[z, 112000000.0], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{t}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 112000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.5000000000000004e72 or 1.12e8 < z Initial program 67.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/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
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.2
Simplified52.2%
Taylor expanded in x around inf
*-commutativeN/A
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6438.7
Simplified38.7%
if -8.5000000000000004e72 < z < 1.12e8Initial program 66.6%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6484.3
Applied egg-rr84.3%
Taylor expanded in y around inf
Simplified80.3%
Taylor expanded in t around inf
+-lowering-+.f6446.7
Simplified46.7%
Final simplification42.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.8e+127) y (if (<= t 1.85e+32) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.8e+127) {
tmp = y;
} else if (t <= 1.85e+32) {
tmp = x;
} else {
tmp = x + 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 <= (-6.8d+127)) then
tmp = y
else if (t <= 1.85d+32) then
tmp = x
else
tmp = x + 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 <= -6.8e+127) {
tmp = y;
} else if (t <= 1.85e+32) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.8e+127: tmp = y elif t <= 1.85e+32: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.8e+127) tmp = y; elseif (t <= 1.85e+32) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.8e+127) tmp = y; elseif (t <= 1.85e+32) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.8e+127], y, If[LessEqual[t, 1.85e+32], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+127}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+32}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -6.79999999999999955e127Initial program 25.3%
Taylor expanded in t around inf
Simplified52.5%
if -6.79999999999999955e127 < t < 1.85e32Initial program 83.6%
Taylor expanded in a around inf
Simplified37.1%
if 1.85e32 < t Initial program 49.7%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6480.8
Applied egg-rr80.8%
Taylor expanded in y around inf
Simplified56.2%
Taylor expanded in t around inf
+-lowering-+.f6432.9
Simplified32.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.5e+126) y (if (<= t 2e+33) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.5e+126) {
tmp = y;
} else if (t <= 2e+33) {
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 <= (-1.5d+126)) then
tmp = y
else if (t <= 2d+33) 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 <= -1.5e+126) {
tmp = y;
} else if (t <= 2e+33) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.5e+126: tmp = y elif t <= 2e+33: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.5e+126) tmp = y; elseif (t <= 2e+33) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.5e+126) tmp = y; elseif (t <= 2e+33) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.5e+126], y, If[LessEqual[t, 2e+33], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+126}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+33}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.5000000000000001e126 or 1.9999999999999999e33 < t Initial program 38.7%
Taylor expanded in t around inf
Simplified41.1%
if -1.5000000000000001e126 < t < 1.9999999999999999e33Initial program 83.6%
Taylor expanded in a around inf
Simplified37.1%
(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 66.9%
Taylor expanded in a around inf
Simplified27.0%
(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 2024195
(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))))