
(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 15 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)) (- z a))))
(if (<= t_1 -5e+35)
(+ x (* (- z t) (/ y (- z a))))
(if (<= t_1 1e+248) (+ x t_1) (+ x (/ (- z t) (/ (- z a) y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -5e+35) {
tmp = x + ((z - t) * (y / (z - a)));
} else if (t_1 <= 1e+248) {
tmp = x + t_1;
} else {
tmp = x + ((z - t) / ((z - 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) :: t_1
real(8) :: tmp
t_1 = (y * (z - t)) / (z - a)
if (t_1 <= (-5d+35)) then
tmp = x + ((z - t) * (y / (z - a)))
else if (t_1 <= 1d+248) then
tmp = x + t_1
else
tmp = x + ((z - t) / ((z - a) / y))
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)) / (z - a);
double tmp;
if (t_1 <= -5e+35) {
tmp = x + ((z - t) * (y / (z - a)));
} else if (t_1 <= 1e+248) {
tmp = x + t_1;
} else {
tmp = x + ((z - t) / ((z - a) / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if t_1 <= -5e+35: tmp = x + ((z - t) * (y / (z - a))) elif t_1 <= 1e+248: tmp = x + t_1 else: tmp = x + ((z - t) / ((z - a) / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+35) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); elseif (t_1 <= 1e+248) tmp = Float64(x + t_1); else tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if (t_1 <= -5e+35) tmp = x + ((z - t) * (y / (z - a))); elseif (t_1 <= 1e+248) tmp = x + t_1; else tmp = x + ((z - t) / ((z - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+35], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+248], N[(x + t$95$1), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+35}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;t\_1 \leq 10^{+248}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000021e35Initial program 70.1%
+-commutative70.1%
associate-/l*98.3%
fma-define98.4%
Simplified98.4%
fma-undefine98.3%
associate-/l*70.1%
div-inv70.1%
*-commutative70.1%
associate-*r*99.8%
div-inv99.9%
Applied egg-rr99.9%
if -5.00000000000000021e35 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.00000000000000005e248Initial program 99.9%
if 1.00000000000000005e248 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 49.2%
+-commutative49.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*49.2%
div-inv49.1%
*-commutative49.1%
associate-*r*99.5%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 85.9%
+-commutative85.9%
associate-/l*98.5%
fma-define98.5%
Simplified98.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 -5e+35) (not (<= t_1 1e+248)))
(+ x (* (- z t) (/ y (- z a))))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -5e+35) || !(t_1 <= 1e+248)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (z - t)) / (z - a)
if ((t_1 <= (-5d+35)) .or. (.not. (t_1 <= 1d+248))) then
tmp = x + ((z - t) * (y / (z - a)))
else
tmp = x + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -5e+35) || !(t_1 <= 1e+248)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -5e+35) or not (t_1 <= 1e+248): tmp = x + ((z - t) * (y / (z - a))) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= -5e+35) || !(t_1 <= 1e+248)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -5e+35) || ~((t_1 <= 1e+248))) tmp = x + ((z - t) * (y / (z - a))); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+35], N[Not[LessEqual[t$95$1, 1e+248]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+35} \lor \neg \left(t\_1 \leq 10^{+248}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000021e35 or 1.00000000000000005e248 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 63.8%
+-commutative63.8%
associate-/l*98.8%
fma-define98.8%
Simplified98.8%
fma-undefine98.8%
associate-/l*63.8%
div-inv63.7%
*-commutative63.7%
associate-*r*99.7%
div-inv99.9%
Applied egg-rr99.9%
if -5.00000000000000021e35 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.00000000000000005e248Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+92)
(+ y x)
(if (<= z -1e-90)
(- x (/ t (/ z y)))
(if (<= z 2.65e+28) (+ x (/ t (/ a y))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+92) {
tmp = y + x;
} else if (z <= -1e-90) {
tmp = x - (t / (z / y));
} else if (z <= 2.65e+28) {
tmp = x + (t / (a / 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 <= (-9.5d+92)) then
tmp = y + x
else if (z <= (-1d-90)) then
tmp = x - (t / (z / y))
else if (z <= 2.65d+28) then
tmp = x + (t / (a / 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 <= -9.5e+92) {
tmp = y + x;
} else if (z <= -1e-90) {
tmp = x - (t / (z / y));
} else if (z <= 2.65e+28) {
tmp = x + (t / (a / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+92: tmp = y + x elif z <= -1e-90: tmp = x - (t / (z / y)) elif z <= 2.65e+28: tmp = x + (t / (a / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+92) tmp = Float64(y + x); elseif (z <= -1e-90) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= 2.65e+28) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+92) tmp = y + x; elseif (z <= -1e-90) tmp = x - (t / (z / y)); elseif (z <= 2.65e+28) tmp = x + (t / (a / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+92], N[(y + x), $MachinePrecision], If[LessEqual[z, -1e-90], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e+28], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+92}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-90}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.4999999999999995e92 or 2.6500000000000002e28 < z Initial program 69.5%
+-commutative69.5%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.9%
+-commutative77.9%
Simplified77.9%
if -9.4999999999999995e92 < z < -9.99999999999999995e-91Initial program 97.2%
Taylor expanded in t around inf 75.7%
mul-1-neg75.7%
associate-/l*78.4%
distribute-rgt-neg-in78.4%
distribute-frac-neg278.4%
Simplified78.4%
Taylor expanded in z around inf 67.0%
mul-1-neg67.0%
unsub-neg67.0%
associate-/l*69.6%
Simplified69.6%
clear-num69.6%
un-div-inv69.6%
Applied egg-rr69.6%
if -9.99999999999999995e-91 < z < 2.6500000000000002e28Initial program 95.4%
+-commutative95.4%
associate-/l*97.1%
fma-define97.1%
Simplified97.1%
Taylor expanded in z around 0 79.2%
+-commutative79.2%
associate-/l*81.4%
Simplified81.4%
clear-num81.4%
un-div-inv81.5%
Applied egg-rr81.5%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e+93)
(+ y x)
(if (<= z -1.9e-93)
(- x (* t (/ y z)))
(if (<= z 2.3e+28) (+ x (/ t (/ a y))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+93) {
tmp = y + x;
} else if (z <= -1.9e-93) {
tmp = x - (t * (y / z));
} else if (z <= 2.3e+28) {
tmp = x + (t / (a / 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 <= (-1.85d+93)) then
tmp = y + x
else if (z <= (-1.9d-93)) then
tmp = x - (t * (y / z))
else if (z <= 2.3d+28) then
tmp = x + (t / (a / 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 <= -1.85e+93) {
tmp = y + x;
} else if (z <= -1.9e-93) {
tmp = x - (t * (y / z));
} else if (z <= 2.3e+28) {
tmp = x + (t / (a / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e+93: tmp = y + x elif z <= -1.9e-93: tmp = x - (t * (y / z)) elif z <= 2.3e+28: tmp = x + (t / (a / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e+93) tmp = Float64(y + x); elseif (z <= -1.9e-93) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 2.3e+28) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.85e+93) tmp = y + x; elseif (z <= -1.9e-93) tmp = x - (t * (y / z)); elseif (z <= 2.3e+28) tmp = x + (t / (a / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+93], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.9e-93], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+28], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+93}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-93}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.84999999999999994e93 or 2.29999999999999984e28 < z Initial program 69.5%
+-commutative69.5%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.9%
+-commutative77.9%
Simplified77.9%
if -1.84999999999999994e93 < z < -1.8999999999999999e-93Initial program 97.2%
Taylor expanded in t around inf 75.7%
mul-1-neg75.7%
associate-/l*78.4%
distribute-rgt-neg-in78.4%
distribute-frac-neg278.4%
Simplified78.4%
Taylor expanded in z around inf 67.0%
mul-1-neg67.0%
unsub-neg67.0%
associate-/l*69.6%
Simplified69.6%
if -1.8999999999999999e-93 < z < 2.29999999999999984e28Initial program 95.4%
+-commutative95.4%
associate-/l*97.1%
fma-define97.1%
Simplified97.1%
Taylor expanded in z around 0 79.2%
+-commutative79.2%
associate-/l*81.4%
Simplified81.4%
clear-num81.4%
un-div-inv81.5%
Applied egg-rr81.5%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.95e+94)
(+ x (* y (/ z (- z a))))
(if (<= z 2.25e+165)
(+ x (/ (* y (- z t)) (- z a)))
(+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+94) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 2.25e+165) {
tmp = x + ((y * (z - t)) / (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 (z <= (-1.95d+94)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 2.25d+165) then
tmp = x + ((y * (z - t)) / (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 (z <= -1.95e+94) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 2.25e+165) {
tmp = x + ((y * (z - t)) / (z - a));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e+94: tmp = x + (y * (z / (z - a))) elif z <= 2.25e+165: tmp = x + ((y * (z - t)) / (z - a)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e+94) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 2.25e+165) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / 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 (z <= -1.95e+94) tmp = x + (y * (z / (z - a))); elseif (z <= 2.25e+165) tmp = x + ((y * (z - t)) / (z - a)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+94], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+165], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $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}\;z \leq -1.95 \cdot 10^{+94}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+165}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -1.94999999999999993e94Initial program 61.8%
Taylor expanded in t around 0 55.9%
associate-/l*91.6%
Simplified91.6%
if -1.94999999999999993e94 < z < 2.2499999999999998e165Initial program 95.9%
if 2.2499999999999998e165 < z Initial program 48.5%
Taylor expanded in a around 0 48.5%
associate-/l*99.8%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.5e-101) (not (<= z 1.65e-92))) (+ 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.5e-101) || !(z <= 1.65e-92)) {
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.5d-101)) .or. (.not. (z <= 1.65d-92))) 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.5e-101) || !(z <= 1.65e-92)) {
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.5e-101) or not (z <= 1.65e-92): 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.5e-101) || !(z <= 1.65e-92)) 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.5e-101) || ~((z <= 1.65e-92))) 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.5e-101], N[Not[LessEqual[z, 1.65e-92]], $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.5 \cdot 10^{-101} \lor \neg \left(z \leq 1.65 \cdot 10^{-92}\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.49999999999999994e-101 or 1.64999999999999999e-92 < z Initial program 80.3%
Taylor expanded in a around 0 66.2%
associate-/l*84.0%
div-sub84.0%
*-inverses84.0%
Simplified84.0%
if -3.49999999999999994e-101 < z < 1.64999999999999999e-92Initial program 95.0%
+-commutative95.0%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
Taylor expanded in z around 0 82.0%
+-commutative82.0%
associate-/l*84.9%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
Applied egg-rr85.0%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.9e+91) (+ x (* y (/ z (- z a)))) (if (<= z 3.85e+28) (- x (/ t (/ (- z a) y))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+91) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 3.85e+28) {
tmp = x - (t / ((z - a) / y));
} 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 (z <= (-2.9d+91)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 3.85d+28) then
tmp = x - (t / ((z - a) / y))
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 (z <= -2.9e+91) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 3.85e+28) {
tmp = x - (t / ((z - a) / y));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+91: tmp = x + (y * (z / (z - a))) elif z <= 3.85e+28: tmp = x - (t / ((z - a) / y)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+91) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 3.85e+28) tmp = Float64(x - Float64(t / Float64(Float64(z - a) / y))); 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 (z <= -2.9e+91) tmp = x + (y * (z / (z - a))); elseif (z <= 3.85e+28) tmp = x - (t / ((z - a) / y)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+91], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.85e+28], N[(x - N[(t / N[(N[(z - a), $MachinePrecision] / y), $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}\;z \leq -2.9 \cdot 10^{+91}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 3.85 \cdot 10^{+28}:\\
\;\;\;\;x - \frac{t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -2.90000000000000014e91Initial program 61.8%
Taylor expanded in t around 0 55.9%
associate-/l*91.6%
Simplified91.6%
if -2.90000000000000014e91 < z < 3.8499999999999999e28Initial program 95.8%
Taylor expanded in t around inf 86.3%
mul-1-neg86.3%
associate-/l*88.7%
distribute-rgt-neg-in88.7%
distribute-frac-neg288.7%
Simplified88.7%
*-commutative88.7%
add-sqr-sqrt43.4%
sqrt-unprod69.5%
sqr-neg69.5%
sqrt-unprod30.3%
add-sqr-sqrt53.6%
cancel-sign-sub53.6%
distribute-frac-neg253.6%
*-commutative53.6%
clear-num53.6%
un-div-inv53.6%
add-sqr-sqrt23.4%
sqrt-unprod63.9%
sqr-neg63.9%
sqrt-unprod45.3%
Applied egg-rr88.8%
if 3.8499999999999999e28 < z Initial program 76.9%
Taylor expanded in a around 0 67.0%
associate-/l*88.0%
div-sub88.0%
*-inverses88.0%
Simplified88.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -4e-89) (+ x (- y (* t (/ y z)))) (if (<= z 1.65e-92) (+ x (* y (/ (- t z) a))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e-89) {
tmp = x + (y - (t * (y / z)));
} else if (z <= 1.65e-92) {
tmp = x + (y * ((t - 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 (z <= (-4d-89)) then
tmp = x + (y - (t * (y / z)))
else if (z <= 1.65d-92) then
tmp = x + (y * ((t - 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 (z <= -4e-89) {
tmp = x + (y - (t * (y / z)));
} else if (z <= 1.65e-92) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e-89: tmp = x + (y - (t * (y / z))) elif z <= 1.65e-92: tmp = x + (y * ((t - z) / a)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e-89) tmp = Float64(x + Float64(y - Float64(t * Float64(y / z)))); elseif (z <= 1.65e-92) tmp = Float64(x + Float64(y * Float64(Float64(t - 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 (z <= -4e-89) tmp = x + (y - (t * (y / z))); elseif (z <= 1.65e-92) tmp = x + (y * ((t - z) / a)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e-89], N[(x + N[(y - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-92], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $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}\;z \leq -4 \cdot 10^{-89}:\\
\;\;\;\;x + \left(y - t \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-92}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -4.00000000000000015e-89Initial program 76.7%
+-commutative76.7%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
fma-undefine99.8%
associate-/l*76.7%
div-inv76.6%
*-commutative76.6%
associate-*r*95.0%
div-inv95.1%
Applied egg-rr95.1%
clear-num95.1%
un-div-inv95.2%
Applied egg-rr95.2%
div-sub88.9%
Applied egg-rr88.9%
Taylor expanded in a around 0 79.8%
associate--l+79.8%
associate-*r/85.5%
Simplified85.5%
if -4.00000000000000015e-89 < z < 1.64999999999999999e-92Initial program 95.0%
+-commutative95.0%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
Taylor expanded in a around inf 87.1%
mul-1-neg87.1%
unsub-neg87.1%
associate-/l*88.3%
Simplified88.3%
if 1.64999999999999999e-92 < z Initial program 84.1%
Taylor expanded in a around 0 69.0%
associate-/l*82.4%
div-sub82.4%
*-inverses82.4%
Simplified82.4%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.55e-93) (+ x (- y (* t (/ y z)))) (if (<= z 1.65e-92) (+ x (/ t (/ a y))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e-93) {
tmp = x + (y - (t * (y / z)));
} else if (z <= 1.65e-92) {
tmp = x + (t / (a / y));
} 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 (z <= (-1.55d-93)) then
tmp = x + (y - (t * (y / z)))
else if (z <= 1.65d-92) then
tmp = x + (t / (a / y))
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 (z <= -1.55e-93) {
tmp = x + (y - (t * (y / z)));
} else if (z <= 1.65e-92) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e-93: tmp = x + (y - (t * (y / z))) elif z <= 1.65e-92: tmp = x + (t / (a / y)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e-93) tmp = Float64(x + Float64(y - Float64(t * Float64(y / z)))); elseif (z <= 1.65e-92) tmp = Float64(x + Float64(t / Float64(a / y))); 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 (z <= -1.55e-93) tmp = x + (y - (t * (y / z))); elseif (z <= 1.65e-92) tmp = x + (t / (a / y)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e-93], N[(x + N[(y - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-92], N[(x + N[(t / N[(a / y), $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}\;z \leq -1.55 \cdot 10^{-93}:\\
\;\;\;\;x + \left(y - t \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-92}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -1.55e-93Initial program 76.7%
+-commutative76.7%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
fma-undefine99.8%
associate-/l*76.7%
div-inv76.6%
*-commutative76.6%
associate-*r*95.0%
div-inv95.1%
Applied egg-rr95.1%
clear-num95.1%
un-div-inv95.2%
Applied egg-rr95.2%
div-sub88.9%
Applied egg-rr88.9%
Taylor expanded in a around 0 79.8%
associate--l+79.8%
associate-*r/85.5%
Simplified85.5%
if -1.55e-93 < z < 1.64999999999999999e-92Initial program 95.0%
+-commutative95.0%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
Taylor expanded in z around 0 82.0%
+-commutative82.0%
associate-/l*84.9%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
Applied egg-rr85.0%
if 1.64999999999999999e-92 < z Initial program 84.1%
Taylor expanded in a around 0 69.0%
associate-/l*82.4%
div-sub82.4%
*-inverses82.4%
Simplified82.4%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e+76) (not (<= z 1.38e+28))) (+ y x) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.4e+76) || !(z <= 1.38e+28)) {
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 <= (-1.4d+76)) .or. (.not. (z <= 1.38d+28))) 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 <= -1.4e+76) || !(z <= 1.38e+28)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.4e+76) or not (z <= 1.38e+28): tmp = y + x else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.4e+76) || !(z <= 1.38e+28)) 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 <= -1.4e+76) || ~((z <= 1.38e+28))) tmp = y + x; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.4e+76], N[Not[LessEqual[z, 1.38e+28]], $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 -1.4 \cdot 10^{+76} \lor \neg \left(z \leq 1.38 \cdot 10^{+28}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.3999999999999999e76 or 1.38000000000000003e28 < z Initial program 70.8%
+-commutative70.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
+-commutative77.8%
Simplified77.8%
if -1.3999999999999999e76 < z < 1.38000000000000003e28Initial program 95.6%
+-commutative95.6%
associate-/l*97.6%
fma-define97.6%
Simplified97.6%
Taylor expanded in z around 0 73.3%
+-commutative73.3%
associate-/l*75.1%
Simplified75.1%
clear-num75.1%
un-div-inv75.1%
Applied egg-rr75.1%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.8e+78) (not (<= z 1.8e+29))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8e+78) || !(z <= 1.8e+29)) {
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 <= (-6.8d+78)) .or. (.not. (z <= 1.8d+29))) 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 <= -6.8e+78) || !(z <= 1.8e+29)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.8e+78) or not (z <= 1.8e+29): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.8e+78) || !(z <= 1.8e+29)) 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 <= -6.8e+78) || ~((z <= 1.8e+29))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.8e+78], N[Not[LessEqual[z, 1.8e+29]], $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 -6.8 \cdot 10^{+78} \lor \neg \left(z \leq 1.8 \cdot 10^{+29}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.80000000000000014e78 or 1.79999999999999988e29 < z Initial program 70.8%
+-commutative70.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
+-commutative77.8%
Simplified77.8%
if -6.80000000000000014e78 < z < 1.79999999999999988e29Initial program 95.6%
+-commutative95.6%
associate-/l*97.6%
fma-define97.6%
Simplified97.6%
Taylor expanded in z around 0 73.3%
+-commutative73.3%
associate-/l*75.1%
Simplified75.1%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e+77) (not (<= z 3.9e+28))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e+77) || !(z <= 3.9e+28)) {
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 <= (-1.8d+77)) .or. (.not. (z <= 3.9d+28))) 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 <= -1.8e+77) || !(z <= 3.9e+28)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.8e+77) or not (z <= 3.9e+28): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e+77) || !(z <= 3.9e+28)) 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 <= -1.8e+77) || ~((z <= 3.9e+28))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e+77], N[Not[LessEqual[z, 3.9e+28]], $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 -1.8 \cdot 10^{+77} \lor \neg \left(z \leq 3.9 \cdot 10^{+28}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.7999999999999999e77 or 3.8999999999999999e28 < z Initial program 70.8%
+-commutative70.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
+-commutative77.8%
Simplified77.8%
if -1.7999999999999999e77 < z < 3.8999999999999999e28Initial program 95.6%
Taylor expanded in z around 0 73.3%
Final simplification75.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.8e-77) (not (<= z 0.0034))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e-77) || !(z <= 0.0034)) {
tmp = y + x;
} else {
tmp = 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 <= (-4.8d-77)) .or. (.not. (z <= 0.0034d0))) then
tmp = y + x
else
tmp = 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 <= -4.8e-77) || !(z <= 0.0034)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.8e-77) or not (z <= 0.0034): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.8e-77) || !(z <= 0.0034)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.8e-77) || ~((z <= 0.0034))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e-77], N[Not[LessEqual[z, 0.0034]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-77} \lor \neg \left(z \leq 0.0034\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.7999999999999998e-77 or 0.00339999999999999981 < z Initial program 76.9%
+-commutative76.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 69.6%
+-commutative69.6%
Simplified69.6%
if -4.7999999999999998e-77 < z < 0.00339999999999999981Initial program 96.0%
+-commutative96.0%
associate-/l*96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in y around 0 58.3%
Final simplification64.2%
(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 85.9%
+-commutative85.9%
associate-/l*98.5%
fma-define98.5%
Simplified98.5%
Taylor expanded in y around 0 51.6%
(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 2024137
(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))))