
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- a t)))) (if (<= t_1 1e+214) (fma t_1 y x) (fma (/ y (- t a)) (- t z) x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= 1e+214) {
tmp = fma(t_1, y, x);
} else {
tmp = fma((y / (t - a)), (t - z), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= 1e+214) tmp = fma(t_1, y, x); else tmp = fma(Float64(y / Float64(t - a)), Float64(t - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+214], N[(t$95$1 * y + x), $MachinePrecision], N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq 10^{+214}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t - a}, t - z, x\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < 9.9999999999999995e213Initial program 99.1%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.1
Applied egg-rr99.1%
if 9.9999999999999995e213 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 70.3%
+-commutativeN/A
clear-numN/A
un-div-invN/A
frac-2negN/A
associate-/r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f6499.8
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))))
(if (<= t_1 -1000000000000.0)
(* t_1 y)
(if (<= t_1 5e-5)
(fma y (/ (- z t) a) x)
(if (<= t_1 2e+72) (fma y (- 1.0 (/ z t)) x) (fma z (/ y a) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -1000000000000.0) {
tmp = t_1 * y;
} else if (t_1 <= 5e-5) {
tmp = fma(y, ((z - t) / a), x);
} else if (t_1 <= 2e+72) {
tmp = fma(y, (1.0 - (z / t)), x);
} else {
tmp = fma(z, (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= -1000000000000.0) tmp = Float64(t_1 * y); elseif (t_1 <= 5e-5) tmp = fma(y, Float64(Float64(z - t) / a), x); elseif (t_1 <= 2e+72) tmp = fma(y, Float64(1.0 - Float64(z / t)), x); else tmp = fma(z, Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1000000000000.0], N[(t$95$1 * y), $MachinePrecision], If[LessEqual[t$95$1, 5e-5], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+72], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq -1000000000000:\\
\;\;\;\;t\_1 \cdot y\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -1e12Initial program 98.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6458.8
Simplified58.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6471.0
Applied egg-rr71.0%
if -1e12 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000024e-5Initial program 98.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.1
Simplified98.1%
if 5.00000000000000024e-5 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1.99999999999999989e72Initial program 99.9%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6495.2
Simplified95.2%
if 1.99999999999999989e72 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 85.1%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.1
Applied egg-rr85.1%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6475.7
Simplified75.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (fma y (- 1.0 (/ z t)) x)))
(if (<= t_1 -1000000000000.0)
t_2
(if (<= t_1 5e-5)
(fma y (/ (- z t) a) x)
(if (<= t_1 2e+72) t_2 (fma z (/ y a) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = fma(y, (1.0 - (z / t)), x);
double tmp;
if (t_1 <= -1000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e-5) {
tmp = fma(y, ((z - t) / a), x);
} else if (t_1 <= 2e+72) {
tmp = t_2;
} else {
tmp = fma(z, (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = fma(y, Float64(1.0 - Float64(z / t)), x) tmp = 0.0 if (t_1 <= -1000000000000.0) tmp = t_2; elseif (t_1 <= 5e-5) tmp = fma(y, Float64(Float64(z - t) / a), x); elseif (t_1 <= 2e+72) tmp = t_2; else tmp = fma(z, Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -1000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e-5], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+72], t$95$2, N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := \mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)\\
\mathbf{if}\;t\_1 \leq -1000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+72}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -1e12 or 5.00000000000000024e-5 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1.99999999999999989e72Initial program 99.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6485.5
Simplified85.5%
if -1e12 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000024e-5Initial program 98.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.1
Simplified98.1%
if 1.99999999999999989e72 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 85.1%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.1
Applied egg-rr85.1%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6475.7
Simplified75.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (fma y (- 1.0 (/ z t)) x)))
(if (<= t_1 -1000000000000.0)
t_2
(if (<= t_1 5e-6)
(- x (* y (/ t a)))
(if (<= t_1 2e+72) t_2 (fma z (/ y a) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = fma(y, (1.0 - (z / t)), x);
double tmp;
if (t_1 <= -1000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e-6) {
tmp = x - (y * (t / a));
} else if (t_1 <= 2e+72) {
tmp = t_2;
} else {
tmp = fma(z, (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = fma(y, Float64(1.0 - Float64(z / t)), x) tmp = 0.0 if (t_1 <= -1000000000000.0) tmp = t_2; elseif (t_1 <= 5e-6) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (t_1 <= 2e+72) tmp = t_2; else tmp = fma(z, Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -1000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e-6], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+72], t$95$2, N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := \mathsf{fma}\left(y, 1 - \frac{z}{t}, x\right)\\
\mathbf{if}\;t\_1 \leq -1000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-6}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+72}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -1e12 or 5.00000000000000041e-6 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1.99999999999999989e72Initial program 99.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6484.9
Simplified84.9%
if -1e12 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000041e-6Initial program 98.8%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.8
Applied egg-rr98.8%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.8
Applied egg-rr98.8%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6492.0
Simplified92.0%
Taylor expanded in t around 0
/-lowering-/.f6491.5
Simplified91.5%
if 1.99999999999999989e72 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 85.1%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.1
Applied egg-rr85.1%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6475.7
Simplified75.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (* z (/ y (- a t)))))
(if (<= t_1 -1000000000000.0)
t_2
(if (<= t_1 5e-11)
(- x (* y (/ t a)))
(if (<= t_1 5000000000000.0) (+ y x) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = z * (y / (a - t));
double tmp;
if (t_1 <= -1000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e-11) {
tmp = x - (y * (t / a));
} else if (t_1 <= 5000000000000.0) {
tmp = y + x;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (z - t) / (a - t)
t_2 = z * (y / (a - t))
if (t_1 <= (-1000000000000.0d0)) then
tmp = t_2
else if (t_1 <= 5d-11) then
tmp = x - (y * (t / a))
else if (t_1 <= 5000000000000.0d0) then
tmp = y + x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = z * (y / (a - t));
double tmp;
if (t_1 <= -1000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e-11) {
tmp = x - (y * (t / a));
} else if (t_1 <= 5000000000000.0) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) t_2 = z * (y / (a - t)) tmp = 0 if t_1 <= -1000000000000.0: tmp = t_2 elif t_1 <= 5e-11: tmp = x - (y * (t / a)) elif t_1 <= 5000000000000.0: tmp = y + x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = Float64(z * Float64(y / Float64(a - t))) tmp = 0.0 if (t_1 <= -1000000000000.0) tmp = t_2; elseif (t_1 <= 5e-11) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (t_1 <= 5000000000000.0) tmp = Float64(y + x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); t_2 = z * (y / (a - t)); tmp = 0.0; if (t_1 <= -1000000000000.0) tmp = t_2; elseif (t_1 <= 5e-11) tmp = x - (y * (t / a)); elseif (t_1 <= 5000000000000.0) tmp = y + x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e-11], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5000000000000.0], N[(y + x), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t\_1 \leq -1000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-11}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 5000000000000:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -1e12 or 5e12 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 93.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6461.9
Simplified61.9%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.5
Applied egg-rr69.5%
if -1e12 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000018e-11Initial program 98.8%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.8
Applied egg-rr98.8%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.8
Applied egg-rr98.8%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6493.0
Simplified93.0%
Taylor expanded in t around 0
/-lowering-/.f6492.4
Simplified92.4%
if 5.00000000000000018e-11 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5e12Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6493.7
Simplified93.7%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (* z (/ y (- a t)))))
(if (<= t_1 -1000000000000.0)
t_2
(if (<= t_1 5e-5)
(fma z (/ y a) x)
(if (<= t_1 5000000000000.0) (+ y x) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = z * (y / (a - t));
double tmp;
if (t_1 <= -1000000000000.0) {
tmp = t_2;
} else if (t_1 <= 5e-5) {
tmp = fma(z, (y / a), x);
} else if (t_1 <= 5000000000000.0) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = Float64(z * Float64(y / Float64(a - t))) tmp = 0.0 if (t_1 <= -1000000000000.0) tmp = t_2; elseif (t_1 <= 5e-5) tmp = fma(z, Float64(y / a), x); elseif (t_1 <= 5000000000000.0) tmp = Float64(y + x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1000000000000.0], t$95$2, If[LessEqual[t$95$1, 5e-5], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 5000000000000.0], N[(y + x), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t\_1 \leq -1000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 5000000000000:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -1e12 or 5e12 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 93.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6461.9
Simplified61.9%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.5
Applied egg-rr69.5%
if -1e12 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000024e-5Initial program 98.9%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.9
Applied egg-rr98.9%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6478.2
Simplified78.2%
if 5.00000000000000024e-5 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5e12Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6495.9
Simplified95.9%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (* z (/ y a))))
(if (<= t_1 -5e+144)
t_2
(if (<= t_1 5e-62) x (if (<= t_1 2e+72) (+ y x) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = z * (y / a);
double tmp;
if (t_1 <= -5e+144) {
tmp = t_2;
} else if (t_1 <= 5e-62) {
tmp = x;
} else if (t_1 <= 2e+72) {
tmp = y + x;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (z - t) / (a - t)
t_2 = z * (y / a)
if (t_1 <= (-5d+144)) then
tmp = t_2
else if (t_1 <= 5d-62) then
tmp = x
else if (t_1 <= 2d+72) then
tmp = y + x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = z * (y / a);
double tmp;
if (t_1 <= -5e+144) {
tmp = t_2;
} else if (t_1 <= 5e-62) {
tmp = x;
} else if (t_1 <= 2e+72) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) t_2 = z * (y / a) tmp = 0 if t_1 <= -5e+144: tmp = t_2 elif t_1 <= 5e-62: tmp = x elif t_1 <= 2e+72: tmp = y + x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = Float64(z * Float64(y / a)) tmp = 0.0 if (t_1 <= -5e+144) tmp = t_2; elseif (t_1 <= 5e-62) tmp = x; elseif (t_1 <= 2e+72) tmp = Float64(y + x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); t_2 = z * (y / a); tmp = 0.0; if (t_1 <= -5e+144) tmp = t_2; elseif (t_1 <= 5e-62) tmp = x; elseif (t_1 <= 2e+72) tmp = y + x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+144], t$95$2, If[LessEqual[t$95$1, 5e-62], x, If[LessEqual[t$95$1, 2e+72], N[(y + x), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := z \cdot \frac{y}{a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-62}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+72}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -4.9999999999999999e144 or 1.99999999999999989e72 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 89.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6467.6
Simplified67.6%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.2
Applied egg-rr76.2%
Taylor expanded in a around inf
Simplified51.3%
if -4.9999999999999999e144 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5.0000000000000002e-62Initial program 99.0%
Taylor expanded in x around inf
Simplified63.9%
if 5.0000000000000002e-62 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1.99999999999999989e72Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6484.7
Simplified84.7%
Final simplification68.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- z t) (- a t)) y)))
(if (<= t_1 -4e+133)
(* (- z t) (/ y (- a t)))
(if (<= t_1 5e+59) (+ x (* y (/ t (- t a)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) / (a - t)) * y;
double tmp;
if (t_1 <= -4e+133) {
tmp = (z - t) * (y / (a - t));
} else if (t_1 <= 5e+59) {
tmp = x + (y * (t / (t - 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 = ((z - t) / (a - t)) * y
if (t_1 <= (-4d+133)) then
tmp = (z - t) * (y / (a - t))
else if (t_1 <= 5d+59) then
tmp = x + (y * (t / (t - 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 = ((z - t) / (a - t)) * y;
double tmp;
if (t_1 <= -4e+133) {
tmp = (z - t) * (y / (a - t));
} else if (t_1 <= 5e+59) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) / (a - t)) * y tmp = 0 if t_1 <= -4e+133: tmp = (z - t) * (y / (a - t)) elif t_1 <= 5e+59: tmp = x + (y * (t / (t - a))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) / Float64(a - t)) * y) tmp = 0.0 if (t_1 <= -4e+133) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); elseif (t_1 <= 5e+59) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) / (a - t)) * y; tmp = 0.0; if (t_1 <= -4e+133) tmp = (z - t) * (y / (a - t)); elseif (t_1 <= 5e+59) tmp = x + (y * (t / (t - a))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+133], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+59], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t} \cdot y\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+133}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+59}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < -4.0000000000000001e133Initial program 90.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6467.2
Simplified67.2%
associate-/l*N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.8
Applied egg-rr92.8%
if -4.0000000000000001e133 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < 4.9999999999999997e59Initial program 99.4%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.4
Applied egg-rr99.4%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.3
Applied egg-rr99.3%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6487.7
Simplified87.7%
if 4.9999999999999997e59 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) Initial program 96.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6448.5
Simplified48.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6484.2
Applied egg-rr84.2%
Final simplification87.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- a t))) (t_2 (fma z (/ y a) x))) (if (<= t_1 5e-5) t_2 (if (<= t_1 5000000000000.0) (+ y x) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = fma(z, (y / a), x);
double tmp;
if (t_1 <= 5e-5) {
tmp = t_2;
} else if (t_1 <= 5000000000000.0) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = fma(z, Float64(y / a), x) tmp = 0.0 if (t_1 <= 5e-5) tmp = t_2; elseif (t_1 <= 5000000000000.0) tmp = Float64(y + x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, 5e-5], t$95$2, If[LessEqual[t$95$1, 5000000000000.0], N[(y + x), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := \mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5000000000000:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000024e-5 or 5e12 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.3%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.3
Applied egg-rr96.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6468.7
Simplified68.7%
if 5.00000000000000024e-5 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5e12Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6495.9
Simplified95.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- a t))) (t_2 (fma y (/ z a) x))) (if (<= t_1 5e-5) t_2 (if (<= t_1 5000000000000.0) (+ y x) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = fma(y, (z / a), x);
double tmp;
if (t_1 <= 5e-5) {
tmp = t_2;
} else if (t_1 <= 5000000000000.0) {
tmp = y + x;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = fma(y, Float64(z / a), x) tmp = 0.0 if (t_1 <= 5e-5) tmp = t_2; elseif (t_1 <= 5000000000000.0) tmp = Float64(y + x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, 5e-5], t$95$2, If[LessEqual[t$95$1, 5000000000000.0], N[(y + x), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := \mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5000000000000:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < 5.00000000000000024e-5 or 5e12 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6467.0
Simplified67.0%
if 5.00000000000000024e-5 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5e12Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6495.9
Simplified95.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- z t) (- a t)) y))) (if (<= t_1 -5e+251) y (if (<= t_1 2e+150) x y))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) / (a - t)) * y;
double tmp;
if (t_1 <= -5e+251) {
tmp = y;
} else if (t_1 <= 2e+150) {
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) :: t_1
real(8) :: tmp
t_1 = ((z - t) / (a - t)) * y
if (t_1 <= (-5d+251)) then
tmp = y
else if (t_1 <= 2d+150) 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 t_1 = ((z - t) / (a - t)) * y;
double tmp;
if (t_1 <= -5e+251) {
tmp = y;
} else if (t_1 <= 2e+150) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) / (a - t)) * y tmp = 0 if t_1 <= -5e+251: tmp = y elif t_1 <= 2e+150: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) / Float64(a - t)) * y) tmp = 0.0 if (t_1 <= -5e+251) tmp = y; elseif (t_1 <= 2e+150) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) / (a - t)) * y; tmp = 0.0; if (t_1 <= -5e+251) tmp = y; elseif (t_1 <= 2e+150) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+251], y, If[LessEqual[t$95$1, 2e+150], x, y]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t} \cdot y\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+251}:\\
\;\;\;\;y\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < -5.0000000000000005e251 or 1.99999999999999996e150 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) Initial program 90.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6459.4
Simplified59.4%
Taylor expanded in t around inf
Simplified25.1%
if -5.0000000000000005e251 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < 1.99999999999999996e150Initial program 99.4%
Taylor expanded in x around inf
Simplified65.9%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (<= (/ (- z t) (- a t)) 3.05e-59) x (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) / (a - t)) <= 3.05e-59) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) / (a - t)) <= 3.05d-59) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) / (a - t)) <= 3.05e-59) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) / (a - t)) <= 3.05e-59: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(z - t) / Float64(a - t)) <= 3.05e-59) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) / (a - t)) <= 3.05e-59) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], 3.05e-59], x, N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z - t}{a - t} \leq 3.05 \cdot 10^{-59}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < 3.0499999999999998e-59Initial program 98.5%
Taylor expanded in x around inf
Simplified57.3%
if 3.0499999999999998e-59 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.1%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6469.9
Simplified69.9%
(FPCore (x y z t a) :precision binary64 (fma (/ y (- t a)) (- t z) x))
double code(double x, double y, double z, double t, double a) {
return fma((y / (t - a)), (t - z), x);
}
function code(x, y, z, t, a) return fma(Float64(y / Float64(t - a)), Float64(t - z), x) end
code[x_, y_, z_, t_, a_] := N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y}{t - a}, t - z, x\right)
\end{array}
Initial program 97.3%
+-commutativeN/A
clear-numN/A
un-div-invN/A
frac-2negN/A
associate-/r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f6496.6
Applied egg-rr96.6%
(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 97.3%
Taylor expanded in x around inf
Simplified51.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} 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 * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
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 * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024195
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< y -8508084860551241/100000000000000000000000000000000) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t)))))))
(+ x (* y (/ (- z t) (- a t)))))