
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))) (t_2 (/ t_1 (- z a))))
(if (<= t_2 -2e+271)
(+ x (/ -1.0 (/ (/ (- z a) y) (- t z))))
(if (<= t_2 1.5e+229)
(- x (/ t_1 (- a z)))
(+ x (* (- z t) (/ y (- z a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double t_2 = t_1 / (z - a);
double tmp;
if (t_2 <= -2e+271) {
tmp = x + (-1.0 / (((z - a) / y) / (t - z)));
} else if (t_2 <= 1.5e+229) {
tmp = x - (t_1 / (a - z));
} else {
tmp = x + ((z - t) * (y / (z - a)));
}
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 = y * (z - t)
t_2 = t_1 / (z - a)
if (t_2 <= (-2d+271)) then
tmp = x + ((-1.0d0) / (((z - a) / y) / (t - z)))
else if (t_2 <= 1.5d+229) then
tmp = x - (t_1 / (a - z))
else
tmp = x + ((z - t) * (y / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double t_2 = t_1 / (z - a);
double tmp;
if (t_2 <= -2e+271) {
tmp = x + (-1.0 / (((z - a) / y) / (t - z)));
} else if (t_2 <= 1.5e+229) {
tmp = x - (t_1 / (a - z));
} else {
tmp = x + ((z - t) * (y / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) t_2 = t_1 / (z - a) tmp = 0 if t_2 <= -2e+271: tmp = x + (-1.0 / (((z - a) / y) / (t - z))) elif t_2 <= 1.5e+229: tmp = x - (t_1 / (a - z)) else: tmp = x + ((z - t) * (y / (z - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) t_2 = Float64(t_1 / Float64(z - a)) tmp = 0.0 if (t_2 <= -2e+271) tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(z - a) / y) / Float64(t - z)))); elseif (t_2 <= 1.5e+229) tmp = Float64(x - Float64(t_1 / Float64(a - z))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); t_2 = t_1 / (z - a); tmp = 0.0; if (t_2 <= -2e+271) tmp = x + (-1.0 / (((z - a) / y) / (t - z))); elseif (t_2 <= 1.5e+229) tmp = x - (t_1 / (a - z)); else tmp = x + ((z - t) * (y / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+271], N[(x + N[(-1.0 / N[(N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1.5e+229], N[(x - N[(t$95$1 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
t_2 := \frac{t\_1}{z - a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+271}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{z - a}{y}}{t - z}}\\
\mathbf{elif}\;t\_2 \leq 1.5 \cdot 10^{+229}:\\
\;\;\;\;x - \frac{t\_1}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -1.99999999999999991e271Initial program 75.4%
clear-num75.4%
inv-pow75.4%
Applied egg-rr75.4%
unpow-175.4%
associate-/r*99.9%
Simplified99.9%
if -1.99999999999999991e271 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.49999999999999999e229Initial program 99.8%
if 1.49999999999999999e229 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 46.6%
+-commutative46.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
associate-/l*46.6%
div-inv46.6%
*-commutative46.6%
associate-*r*99.5%
div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.95e-202) (fma y (/ (- z t) (- z a)) x) (+ x (* (- z t) (/ y (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.95e-202) {
tmp = fma(y, ((z - t) / (z - a)), x);
} else {
tmp = x + ((z - t) * (y / (z - a)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.95e-202) tmp = fma(y, Float64(Float64(z - t) / Float64(z - a)), x); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.95e-202], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-202}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\end{array}
\end{array}
if y < -1.95e-202Initial program 92.1%
+-commutative92.1%
associate-/l*98.0%
fma-define98.0%
Simplified98.0%
if -1.95e-202 < y Initial program 90.3%
+-commutative90.3%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
fma-undefine96.2%
associate-/l*90.3%
div-inv90.3%
*-commutative90.3%
associate-*r*98.6%
div-inv98.7%
Applied egg-rr98.7%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))) (t_2 (/ t_1 (- z a))))
(if (or (<= t_2 -2e+271) (not (<= t_2 1.5e+229)))
(+ x (* (- z t) (/ y (- z a))))
(- x (/ t_1 (- a z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double t_2 = t_1 / (z - a);
double tmp;
if ((t_2 <= -2e+271) || !(t_2 <= 1.5e+229)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x - (t_1 / (a - z));
}
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 = y * (z - t)
t_2 = t_1 / (z - a)
if ((t_2 <= (-2d+271)) .or. (.not. (t_2 <= 1.5d+229))) then
tmp = x + ((z - t) * (y / (z - a)))
else
tmp = x - (t_1 / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double t_2 = t_1 / (z - a);
double tmp;
if ((t_2 <= -2e+271) || !(t_2 <= 1.5e+229)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x - (t_1 / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) t_2 = t_1 / (z - a) tmp = 0 if (t_2 <= -2e+271) or not (t_2 <= 1.5e+229): tmp = x + ((z - t) * (y / (z - a))) else: tmp = x - (t_1 / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) t_2 = Float64(t_1 / Float64(z - a)) tmp = 0.0 if ((t_2 <= -2e+271) || !(t_2 <= 1.5e+229)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(x - Float64(t_1 / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); t_2 = t_1 / (z - a); tmp = 0.0; if ((t_2 <= -2e+271) || ~((t_2 <= 1.5e+229))) tmp = x + ((z - t) * (y / (z - a))); else tmp = x - (t_1 / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -2e+271], N[Not[LessEqual[t$95$2, 1.5e+229]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
t_2 := \frac{t\_1}{z - a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+271} \lor \neg \left(t\_2 \leq 1.5 \cdot 10^{+229}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t\_1}{a - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -1.99999999999999991e271 or 1.49999999999999999e229 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 60.2%
+-commutative60.2%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
fma-undefine99.8%
associate-/l*60.2%
div-inv60.2%
*-commutative60.2%
associate-*r*99.7%
div-inv99.8%
Applied egg-rr99.8%
if -1.99999999999999991e271 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.49999999999999999e229Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.9e+48)
(+ x (* t (/ y a)))
(if (or (<= a -2.05e-21) (not (<= a 1.35e-9)))
(+ x (* y (/ z (- z a))))
(+ x (- y (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.9e+48) {
tmp = x + (t * (y / a));
} else if ((a <= -2.05e-21) || !(a <= 1.35e-9)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y - (t * (y / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.9d+48)) then
tmp = x + (t * (y / a))
else if ((a <= (-2.05d-21)) .or. (.not. (a <= 1.35d-9))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y - (t * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.9e+48) {
tmp = x + (t * (y / a));
} else if ((a <= -2.05e-21) || !(a <= 1.35e-9)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y - (t * (y / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.9e+48: tmp = x + (t * (y / a)) elif (a <= -2.05e-21) or not (a <= 1.35e-9): tmp = x + (y * (z / (z - a))) else: tmp = x + (y - (t * (y / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.9e+48) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((a <= -2.05e-21) || !(a <= 1.35e-9)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y - Float64(t * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.9e+48) tmp = x + (t * (y / a)); elseif ((a <= -2.05e-21) || ~((a <= 1.35e-9))) tmp = x + (y * (z / (z - a))); else tmp = x + (y - (t * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.9e+48], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -2.05e-21], N[Not[LessEqual[a, 1.35e-9]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.9 \cdot 10^{+48}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-21} \lor \neg \left(a \leq 1.35 \cdot 10^{-9}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - t \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if a < -4.9000000000000003e48Initial program 94.7%
+-commutative94.7%
associate-/l*98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in z around 0 85.9%
+-commutative85.9%
associate-/l*87.6%
Simplified87.6%
if -4.9000000000000003e48 < a < -2.04999999999999997e-21 or 1.3500000000000001e-9 < a Initial program 87.3%
Taylor expanded in t around 0 82.2%
associate-/l*87.3%
Simplified87.3%
if -2.04999999999999997e-21 < a < 1.3500000000000001e-9Initial program 91.7%
+-commutative91.7%
associate-/l*94.6%
fma-define94.5%
Simplified94.5%
Taylor expanded in a around 0 77.3%
+-commutative77.3%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in z around inf 81.0%
mul-1-neg81.0%
unsub-neg81.0%
associate-/l*84.0%
Simplified84.0%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.8e+48)
(+ x (* t (/ y a)))
(if (or (<= a -7.8e-22) (not (<= a 8.5e-13)))
(+ x (* y (/ z (- z a))))
(+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+48) {
tmp = x + (t * (y / a));
} else if ((a <= -7.8e-22) || !(a <= 8.5e-13)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.8d+48)) then
tmp = x + (t * (y / a))
else if ((a <= (-7.8d-22)) .or. (.not. (a <= 8.5d-13))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y * (1.0d0 - (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+48) {
tmp = x + (t * (y / a));
} else if ((a <= -7.8e-22) || !(a <= 8.5e-13)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e+48: tmp = x + (t * (y / a)) elif (a <= -7.8e-22) or not (a <= 8.5e-13): tmp = x + (y * (z / (z - a))) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e+48) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((a <= -7.8e-22) || !(a <= 8.5e-13)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e+48) tmp = x + (t * (y / a)); elseif ((a <= -7.8e-22) || ~((a <= 8.5e-13))) tmp = x + (y * (z / (z - a))); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+48], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -7.8e-22], N[Not[LessEqual[a, 8.5e-13]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+48}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -7.8 \cdot 10^{-22} \lor \neg \left(a \leq 8.5 \cdot 10^{-13}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if a < -3.8e48Initial program 94.7%
+-commutative94.7%
associate-/l*98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in z around 0 85.9%
+-commutative85.9%
associate-/l*87.6%
Simplified87.6%
if -3.8e48 < a < -7.79999999999999996e-22 or 8.5000000000000001e-13 < a Initial program 87.3%
Taylor expanded in t around 0 82.2%
associate-/l*87.3%
Simplified87.3%
if -7.79999999999999996e-22 < a < 8.5000000000000001e-13Initial program 91.7%
Taylor expanded in a around 0 77.3%
associate-/l*81.0%
div-sub81.0%
*-inverses81.0%
Simplified81.0%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= (/ t_1 (- z a)) 5e+245)
(- x (/ t_1 (- a z)))
(+ x (- y (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 / (z - a)) <= 5e+245) {
tmp = x - (t_1 / (a - z));
} else {
tmp = x + (y - (t * (y / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if ((t_1 / (z - a)) <= 5d+245) then
tmp = x - (t_1 / (a - z))
else
tmp = x + (y - (t * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 / (z - a)) <= 5e+245) {
tmp = x - (t_1 / (a - z));
} else {
tmp = x + (y - (t * (y / z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 / (z - a)) <= 5e+245: tmp = x - (t_1 / (a - z)) else: tmp = x + (y - (t * (y / z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (Float64(t_1 / Float64(z - a)) <= 5e+245) tmp = Float64(x - Float64(t_1 / Float64(a - z))); else tmp = Float64(x + Float64(y - Float64(t * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 / (z - a)) <= 5e+245) tmp = x - (t_1 / (a - z)); else tmp = x + (y - (t * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 / N[(z - a), $MachinePrecision]), $MachinePrecision], 5e+245], N[(x - N[(t$95$1 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;\frac{t\_1}{z - a} \leq 5 \cdot 10^{+245}:\\
\;\;\;\;x - \frac{t\_1}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - t \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.00000000000000034e245Initial program 97.0%
if 5.00000000000000034e245 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 42.7%
+-commutative42.7%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 38.9%
+-commutative38.9%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in z around inf 55.7%
mul-1-neg55.7%
unsub-neg55.7%
associate-/l*76.2%
Simplified76.2%
Final simplification94.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -17.0)
(+ y x)
(if (<= z 2.2e-85)
(+ x (/ t (/ a y)))
(if (<= z 5.2e+215) (- x (/ t (/ z y))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -17.0) {
tmp = y + x;
} else if (z <= 2.2e-85) {
tmp = x + (t / (a / y));
} else if (z <= 5.2e+215) {
tmp = x - (t / (z / y));
} 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 <= (-17.0d0)) then
tmp = y + x
else if (z <= 2.2d-85) then
tmp = x + (t / (a / y))
else if (z <= 5.2d+215) then
tmp = x - (t / (z / y))
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 <= -17.0) {
tmp = y + x;
} else if (z <= 2.2e-85) {
tmp = x + (t / (a / y));
} else if (z <= 5.2e+215) {
tmp = x - (t / (z / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -17.0: tmp = y + x elif z <= 2.2e-85: tmp = x + (t / (a / y)) elif z <= 5.2e+215: tmp = x - (t / (z / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -17.0) tmp = Float64(y + x); elseif (z <= 2.2e-85) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 5.2e+215) tmp = Float64(x - Float64(t / Float64(z / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -17.0) tmp = y + x; elseif (z <= 2.2e-85) tmp = x + (t / (a / y)); elseif (z <= 5.2e+215) tmp = x - (t / (z / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -17.0], N[(y + x), $MachinePrecision], If[LessEqual[z, 2.2e-85], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+215], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -17:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-85}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+215}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -17 or 5.2000000000000001e215 < z Initial program 78.2%
+-commutative78.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 80.6%
+-commutative80.6%
Simplified80.6%
if -17 < z < 2.2e-85Initial program 97.4%
+-commutative97.4%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in z around 0 75.4%
+-commutative75.4%
associate-/l*75.7%
Simplified75.7%
clear-num75.8%
un-div-inv76.2%
Applied egg-rr76.2%
if 2.2e-85 < z < 5.2000000000000001e215Initial program 93.2%
Taylor expanded in t around inf 79.6%
mul-1-neg79.6%
associate-/l*84.2%
distribute-rgt-neg-in84.2%
distribute-frac-neg284.2%
Simplified84.2%
Taylor expanded in z around inf 75.1%
mul-1-neg75.1%
unsub-neg75.1%
associate-/l*77.0%
Simplified77.0%
clear-num77.0%
un-div-inv77.1%
Applied egg-rr77.1%
Final simplification77.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -145.0)
(+ y x)
(if (<= z 2.2e-88)
(+ x (/ t (/ a y)))
(if (<= z 5.2e+215) (- x (* t (/ y z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -145.0) {
tmp = y + x;
} else if (z <= 2.2e-88) {
tmp = x + (t / (a / y));
} else if (z <= 5.2e+215) {
tmp = x - (t * (y / z));
} 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 <= (-145.0d0)) then
tmp = y + x
else if (z <= 2.2d-88) then
tmp = x + (t / (a / y))
else if (z <= 5.2d+215) then
tmp = x - (t * (y / z))
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 <= -145.0) {
tmp = y + x;
} else if (z <= 2.2e-88) {
tmp = x + (t / (a / y));
} else if (z <= 5.2e+215) {
tmp = x - (t * (y / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -145.0: tmp = y + x elif z <= 2.2e-88: tmp = x + (t / (a / y)) elif z <= 5.2e+215: tmp = x - (t * (y / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -145.0) tmp = Float64(y + x); elseif (z <= 2.2e-88) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 5.2e+215) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -145.0) tmp = y + x; elseif (z <= 2.2e-88) tmp = x + (t / (a / y)); elseif (z <= 5.2e+215) tmp = x - (t * (y / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -145.0], N[(y + x), $MachinePrecision], If[LessEqual[z, 2.2e-88], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+215], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -145:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+215}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -145 or 5.2000000000000001e215 < z Initial program 78.2%
+-commutative78.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 80.6%
+-commutative80.6%
Simplified80.6%
if -145 < z < 2.20000000000000005e-88Initial program 97.4%
+-commutative97.4%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in z around 0 75.4%
+-commutative75.4%
associate-/l*75.7%
Simplified75.7%
clear-num75.8%
un-div-inv76.2%
Applied egg-rr76.2%
if 2.20000000000000005e-88 < z < 5.2000000000000001e215Initial program 93.2%
Taylor expanded in t around inf 79.6%
mul-1-neg79.6%
associate-/l*84.2%
distribute-rgt-neg-in84.2%
distribute-frac-neg284.2%
Simplified84.2%
Taylor expanded in z around inf 75.1%
mul-1-neg75.1%
unsub-neg75.1%
associate-/l*77.0%
Simplified77.0%
Final simplification77.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.42e+57) (not (<= t 9.5e+29))) (+ x (* t (/ y (- a z)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.42e+57) || !(t <= 9.5e+29)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
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.42d+57)) .or. (.not. (t <= 9.5d+29))) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (y * (z / (z - a)))
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.42e+57) || !(t <= 9.5e+29)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.42e+57) or not (t <= 9.5e+29): tmp = x + (t * (y / (a - z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.42e+57) || !(t <= 9.5e+29)) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.42e+57) || ~((t <= 9.5e+29))) tmp = x + (t * (y / (a - z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.42e+57], N[Not[LessEqual[t, 9.5e+29]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{+57} \lor \neg \left(t \leq 9.5 \cdot 10^{+29}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -1.42e57 or 9.5000000000000003e29 < t Initial program 88.7%
Taylor expanded in t around inf 86.2%
mul-1-neg86.2%
associate-/l*93.7%
distribute-rgt-neg-in93.7%
distribute-frac-neg293.7%
Simplified93.7%
if -1.42e57 < t < 9.5000000000000003e29Initial program 93.0%
Taylor expanded in t around 0 82.7%
associate-/l*89.5%
Simplified89.5%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e-59) (not (<= z 1.95e-38))) (+ x (* y (- 1.0 (/ t z)))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e-59) || !(z <= 1.95e-38)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.4d-59)) .or. (.not. (z <= 1.95d-38))) then
tmp = x + (y * (1.0d0 - (t / z)))
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e-59) || !(z <= 1.95e-38)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.4e-59) or not (z <= 1.95e-38): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e-59) || !(z <= 1.95e-38)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.4e-59) || ~((z <= 1.95e-38))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e-59], N[Not[LessEqual[z, 1.95e-38]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-59} \lor \neg \left(z \leq 1.95 \cdot 10^{-38}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3.40000000000000018e-59 or 1.95e-38 < z Initial program 86.6%
Taylor expanded in a around 0 75.9%
associate-/l*86.1%
div-sub86.1%
*-inverses86.1%
Simplified86.1%
if -3.40000000000000018e-59 < z < 1.95e-38Initial program 97.2%
+-commutative97.2%
associate-/l*92.6%
fma-define92.6%
Simplified92.6%
Taylor expanded in z around 0 76.9%
+-commutative76.9%
associate-/l*77.2%
Simplified77.2%
clear-num77.3%
un-div-inv77.7%
Applied egg-rr77.7%
Final simplification82.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.2e+47) (+ x (* y (/ (- t z) a))) (if (<= a 7.8e-10) (+ x (- y (* t (/ y z)))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e+47) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 7.8e-10) {
tmp = x + (y - (t * (y / z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.2d+47)) then
tmp = x + (y * ((t - z) / a))
else if (a <= 7.8d-10) then
tmp = x + (y - (t * (y / z)))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e+47) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 7.8e-10) {
tmp = x + (y - (t * (y / z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e+47: tmp = x + (y * ((t - z) / a)) elif a <= 7.8e-10: tmp = x + (y - (t * (y / z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.2e+47) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (a <= 7.8e-10) tmp = Float64(x + Float64(y - Float64(t * Float64(y / z)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.2e+47) tmp = x + (y * ((t - z) / a)); elseif (a <= 7.8e-10) tmp = x + (y - (t * (y / z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e+47], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e-10], N[(x + N[(y - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+47}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-10}:\\
\;\;\;\;x + \left(y - t \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if a < -4.2e47Initial program 94.7%
+-commutative94.7%
associate-/l*98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in a around inf 91.5%
mul-1-neg91.5%
unsub-neg91.5%
associate-/l*91.5%
Simplified91.5%
if -4.2e47 < a < 7.7999999999999999e-10Initial program 92.7%
+-commutative92.7%
associate-/l*95.2%
fma-define95.2%
Simplified95.2%
Taylor expanded in a around 0 76.1%
+-commutative76.1%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in z around inf 79.4%
mul-1-neg79.4%
unsub-neg79.4%
associate-/l*82.0%
Simplified82.0%
if 7.7999999999999999e-10 < a Initial program 83.2%
Taylor expanded in t around 0 79.7%
associate-/l*86.4%
Simplified86.4%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -48.0) (not (<= z 1e+60))) (+ y x) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -48.0) || !(z <= 1e+60)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-48.0d0)) .or. (.not. (z <= 1d+60))) then
tmp = y + x
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -48.0) || !(z <= 1e+60)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -48.0) or not (z <= 1e+60): tmp = y + x else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -48.0) || !(z <= 1e+60)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -48.0) || ~((z <= 1e+60))) tmp = y + x; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -48.0], N[Not[LessEqual[z, 1e+60]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -48 \lor \neg \left(z \leq 10^{+60}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -48 or 9.9999999999999995e59 < z Initial program 82.3%
+-commutative82.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -48 < z < 9.9999999999999995e59Initial program 97.3%
+-commutative97.3%
associate-/l*94.7%
fma-define94.7%
Simplified94.7%
Taylor expanded in z around 0 72.6%
+-commutative72.6%
associate-/l*73.5%
Simplified73.5%
clear-num73.5%
un-div-inv73.8%
Applied egg-rr73.8%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.6) (not (<= z 5.2e+59))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6) || !(z <= 5.2e+59)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
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 <= (-3.6d0)) .or. (.not. (z <= 5.2d+59))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6) || !(z <= 5.2e+59)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.6) or not (z <= 5.2e+59): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.6) || !(z <= 5.2e+59)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.6) || ~((z <= 5.2e+59))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.6], N[Not[LessEqual[z, 5.2e+59]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \lor \neg \left(z \leq 5.2 \cdot 10^{+59}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.60000000000000009 or 5.19999999999999999e59 < z Initial program 82.3%
+-commutative82.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -3.60000000000000009 < z < 5.19999999999999999e59Initial program 97.3%
+-commutative97.3%
associate-/l*94.7%
fma-define94.7%
Simplified94.7%
Taylor expanded in z around 0 72.6%
+-commutative72.6%
associate-/l*73.5%
Simplified73.5%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.8) (not (<= z 5.2e+59))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8) || !(z <= 5.2e+59)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
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 <= (-6.8d0)) .or. (.not. (z <= 5.2d+59))) then
tmp = y + x
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8) || !(z <= 5.2e+59)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.8) or not (z <= 5.2e+59): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.8) || !(z <= 5.2e+59)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.8) || ~((z <= 5.2e+59))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.8], N[Not[LessEqual[z, 5.2e+59]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \lor \neg \left(z \leq 5.2 \cdot 10^{+59}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -6.79999999999999982 or 5.19999999999999999e59 < z Initial program 82.3%
+-commutative82.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -6.79999999999999982 < z < 5.19999999999999999e59Initial program 97.3%
Taylor expanded in z around 0 72.6%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.2e+154) x (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e+154) {
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 (a <= (-4.2d+154)) 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 (a <= -4.2e+154) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e+154: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.2e+154) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.2e+154) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e+154], x, N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+154}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -4.19999999999999989e154Initial program 96.9%
+-commutative96.9%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around 0 90.3%
if -4.19999999999999989e154 < a Initial program 90.2%
+-commutative90.2%
associate-/l*96.5%
fma-define96.5%
Simplified96.5%
Taylor expanded in z around inf 57.8%
+-commutative57.8%
Simplified57.8%
(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 91.0%
+-commutative91.0%
associate-/l*96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in y around 0 51.2%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024144
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
(+ x (/ (* y (- z t)) (- z a))))