
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- z a)))) (if (<= t_1 2e+146) (+ x (* t_1 y)) (+ x (/ (* t y) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= 2e+146) {
tmp = x + (t_1 * y);
} else {
tmp = x + ((t * y) / (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) :: tmp
t_1 = (z - t) / (z - a)
if (t_1 <= 2d+146) then
tmp = x + (t_1 * y)
else
tmp = x + ((t * y) / (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 = (z - t) / (z - a);
double tmp;
if (t_1 <= 2e+146) {
tmp = x + (t_1 * y);
} else {
tmp = x + ((t * y) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) tmp = 0 if t_1 <= 2e+146: tmp = x + (t_1 * y) else: tmp = x + ((t * y) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= 2e+146) tmp = Float64(x + Float64(t_1 * y)); else tmp = Float64(x + Float64(Float64(t * y) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); tmp = 0.0; if (t_1 <= 2e+146) tmp = x + (t_1 * y); else tmp = x + ((t * y) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+146], N[(x + N[(t$95$1 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+146}:\\
\;\;\;\;x + t\_1 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a - z}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < 1.99999999999999987e146Initial program 98.6%
if 1.99999999999999987e146 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 80.7%
Taylor expanded in t around inf 99.9%
mul-1-neg99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.9%
Final simplification98.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2)
(+ x y)
(if (<= z 2.75e-83)
(+ x (/ t (/ a y)))
(if (<= z 2.25e+222) (- x (* t (/ y z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2) {
tmp = x + y;
} else if (z <= 2.75e-83) {
tmp = x + (t / (a / y));
} else if (z <= 2.25e+222) {
tmp = x - (t * (y / z));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.2d0)) then
tmp = x + y
else if (z <= 2.75d-83) then
tmp = x + (t / (a / y))
else if (z <= 2.25d+222) then
tmp = x - (t * (y / z))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2) {
tmp = x + y;
} else if (z <= 2.75e-83) {
tmp = x + (t / (a / y));
} else if (z <= 2.25e+222) {
tmp = x - (t * (y / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2: tmp = x + y elif z <= 2.75e-83: tmp = x + (t / (a / y)) elif z <= 2.25e+222: tmp = x - (t * (y / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2) tmp = Float64(x + y); elseif (z <= 2.75e-83) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 2.25e+222) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2) tmp = x + y; elseif (z <= 2.75e-83) tmp = x + (t / (a / y)); elseif (z <= 2.25e+222) tmp = x - (t * (y / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.75e-83], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+222], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{-83}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+222}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.19999999999999996 or 2.24999999999999994e222 < z Initial program 99.9%
Taylor expanded in z around inf 80.6%
+-commutative80.6%
Simplified80.6%
if -1.19999999999999996 < z < 2.74999999999999982e-83Initial program 94.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.74999999999999982e-83 < z < 2.24999999999999994e222Initial program 98.4%
Taylor expanded in t around inf 79.6%
mul-1-neg79.6%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in x around 0 79.6%
Taylor expanded in z around inf 75.1%
associate-*r/77.0%
Simplified77.0%
Final simplification77.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.1e+56) (not (<= t 9e+27))) (+ 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 <= -3.1e+56) || !(t <= 9e+27)) {
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 <= (-3.1d+56)) .or. (.not. (t <= 9d+27))) 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 <= -3.1e+56) || !(t <= 9e+27)) {
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 <= -3.1e+56) or not (t <= 9e+27): 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 <= -3.1e+56) || !(t <= 9e+27)) 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 <= -3.1e+56) || ~((t <= 9e+27))) 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, -3.1e+56], N[Not[LessEqual[t, 9e+27]], $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 -3.1 \cdot 10^{+56} \lor \neg \left(t \leq 9 \cdot 10^{+27}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -3.10000000000000005e56 or 8.9999999999999998e27 < t Initial program 94.1%
Taylor expanded in t around inf 86.2%
mul-1-neg86.2%
associate-/l*93.7%
Simplified93.7%
if -3.10000000000000005e56 < t < 8.9999999999999998e27Initial program 99.2%
Taylor expanded in t around 0 82.7%
+-commutative82.7%
associate-/l*89.5%
Simplified89.5%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.35e+56) (not (<= t 2.7e+28))) (+ x (* y (/ t (- a z)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.35e+56) || !(t <= 2.7e+28)) {
tmp = x + (y * (t / (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.35d+56)) .or. (.not. (t <= 2.7d+28))) then
tmp = x + (y * (t / (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.35e+56) || !(t <= 2.7e+28)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.35e+56) or not (t <= 2.7e+28): tmp = x + (y * (t / (a - z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.35e+56) || !(t <= 2.7e+28)) tmp = Float64(x + Float64(y * Float64(t / 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.35e+56) || ~((t <= 2.7e+28))) tmp = x + (y * (t / (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.35e+56], N[Not[LessEqual[t, 2.7e+28]], $MachinePrecision]], N[(x + N[(y * N[(t / 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.35 \cdot 10^{+56} \lor \neg \left(t \leq 2.7 \cdot 10^{+28}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -1.35000000000000005e56 or 2.7000000000000002e28 < t Initial program 94.1%
Taylor expanded in t around inf 86.2%
associate-*r/86.2%
mul-1-neg86.2%
distribute-lft-neg-out86.2%
*-commutative86.2%
*-lft-identity86.2%
times-frac88.0%
/-rgt-identity88.0%
distribute-neg-frac88.0%
distribute-neg-frac288.0%
neg-sub088.0%
sub-neg88.0%
+-commutative88.0%
associate--r+88.0%
neg-sub088.0%
remove-double-neg88.0%
Simplified88.0%
if -1.35000000000000005e56 < t < 2.7000000000000002e28Initial program 99.2%
Taylor expanded in t around 0 82.7%
+-commutative82.7%
associate-/l*89.5%
Simplified89.5%
Final simplification88.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e+56) (not (<= t 9.4e+27))) (+ x (* y (/ t (- a z)))) (+ x (/ y (/ (- z a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e+56) || !(t <= 9.4e+27)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y / ((z - 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) :: tmp
if ((t <= (-4.6d+56)) .or. (.not. (t <= 9.4d+27))) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (y / ((z - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e+56) || !(t <= 9.4e+27)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.6e+56) or not (t <= 9.4e+27): tmp = x + (y * (t / (a - z))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.6e+56) || !(t <= 9.4e+27)) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.6e+56) || ~((t <= 9.4e+27))) tmp = x + (y * (t / (a - z))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e+56], N[Not[LessEqual[t, 9.4e+27]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+56} \lor \neg \left(t \leq 9.4 \cdot 10^{+27}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if t < -4.60000000000000029e56 or 9.39999999999999952e27 < t Initial program 94.1%
Taylor expanded in t around inf 86.2%
associate-*r/86.2%
mul-1-neg86.2%
distribute-lft-neg-out86.2%
*-commutative86.2%
*-lft-identity86.2%
times-frac88.0%
/-rgt-identity88.0%
distribute-neg-frac88.0%
distribute-neg-frac288.0%
neg-sub088.0%
sub-neg88.0%
+-commutative88.0%
associate--r+88.0%
neg-sub088.0%
remove-double-neg88.0%
Simplified88.0%
if -4.60000000000000029e56 < t < 9.39999999999999952e27Initial program 99.2%
clear-num98.5%
un-div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in t around 0 88.9%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6) (not (<= z 1e-13))) (+ x (* y (- 1.0 (/ t z)))) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6) || !(z <= 1e-13)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y * (t / (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) :: tmp
if ((z <= (-2.6d0)) .or. (.not. (z <= 1d-13))) then
tmp = x + (y * (1.0d0 - (t / z)))
else
tmp = x + (y * (t / (a - 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.6) || !(z <= 1e-13)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6) or not (z <= 1e-13): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6) || !(z <= 1e-13)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.6) || ~((z <= 1e-13))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6], N[Not[LessEqual[z, 1e-13]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \lor \neg \left(z \leq 10^{-13}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -2.60000000000000009 or 1e-13 < z Initial program 99.9%
Taylor expanded in a around 0 75.3%
associate-/l*87.8%
div-sub87.8%
*-inverses87.8%
Simplified87.8%
if -2.60000000000000009 < z < 1e-13Initial program 94.1%
Taylor expanded in t around inf 89.8%
associate-*r/89.8%
mul-1-neg89.8%
distribute-lft-neg-out89.8%
*-commutative89.8%
*-lft-identity89.8%
times-frac86.9%
/-rgt-identity86.9%
distribute-neg-frac86.9%
distribute-neg-frac286.9%
neg-sub086.9%
sub-neg86.9%
+-commutative86.9%
associate--r+86.9%
neg-sub086.9%
remove-double-neg86.9%
Simplified86.9%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e-55) (not (<= z 4.4e-45))) (+ 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 <= -1.4e-55) || !(z <= 4.4e-45)) {
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 <= (-1.4d-55)) .or. (.not. (z <= 4.4d-45))) 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 <= -1.4e-55) || !(z <= 4.4e-45)) {
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 <= -1.4e-55) or not (z <= 4.4e-45): 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 <= -1.4e-55) || !(z <= 4.4e-45)) 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 <= -1.4e-55) || ~((z <= 4.4e-45))) 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, -1.4e-55], N[Not[LessEqual[z, 4.4e-45]], $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 -1.4 \cdot 10^{-55} \lor \neg \left(z \leq 4.4 \cdot 10^{-45}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.39999999999999992e-55 or 4.39999999999999987e-45 < z Initial program 99.9%
Taylor expanded in a around 0 75.9%
associate-/l*86.1%
div-sub86.1%
*-inverses86.1%
Simplified86.1%
if -1.39999999999999992e-55 < z < 4.39999999999999987e-45Initial program 92.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 (<= t -4.2e+56) (+ x (/ (* t y) (- a z))) (if (<= t 1.8e+26) (+ x (* y (/ z (- z a)))) (+ x (* y (/ t (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+56) {
tmp = x + ((t * y) / (a - z));
} else if (t <= 1.8e+26) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / (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) :: tmp
if (t <= (-4.2d+56)) then
tmp = x + ((t * y) / (a - z))
else if (t <= 1.8d+26) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y * (t / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+56) {
tmp = x + ((t * y) / (a - z));
} else if (t <= 1.8e+26) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.2e+56: tmp = x + ((t * y) / (a - z)) elif t <= 1.8e+26: tmp = x + (y * (z / (z - a))) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.2e+56) tmp = Float64(x + Float64(Float64(t * y) / Float64(a - z))); elseif (t <= 1.8e+26) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.2e+56) tmp = x + ((t * y) / (a - z)); elseif (t <= 1.8e+26) tmp = x + (y * (z / (z - a))); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+56], N[(x + N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+26], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+56}:\\
\;\;\;\;x + \frac{t \cdot y}{a - z}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+26}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if t < -4.20000000000000034e56Initial program 94.7%
Taylor expanded in t around inf 88.1%
mul-1-neg88.1%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in x around 0 88.1%
if -4.20000000000000034e56 < t < 1.80000000000000012e26Initial program 99.2%
Taylor expanded in t around 0 82.7%
+-commutative82.7%
associate-/l*89.5%
Simplified89.5%
if 1.80000000000000012e26 < t Initial program 93.5%
Taylor expanded in t around inf 84.4%
associate-*r/84.4%
mul-1-neg84.4%
distribute-lft-neg-out84.4%
*-commutative84.4%
*-lft-identity84.4%
times-frac90.4%
/-rgt-identity90.4%
distribute-neg-frac90.4%
distribute-neg-frac290.4%
neg-sub090.4%
sub-neg90.4%
+-commutative90.4%
associate--r+90.4%
neg-sub090.4%
remove-double-neg90.4%
Simplified90.4%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.0) (+ x (* y (/ (- z t) z))) (if (<= z 1.3e-15) (+ x (* y (/ t (- a z)))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.0) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 1.3e-15) {
tmp = x + (y * (t / (a - z)));
} 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 <= (-9.0d0)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 1.3d-15) then
tmp = x + (y * (t / (a - z)))
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 <= -9.0) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 1.3e-15) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.0: tmp = x + (y * ((z - t) / z)) elif z <= 1.3e-15: tmp = x + (y * (t / (a - z))) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.0) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 1.3e-15) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); 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 <= -9.0) tmp = x + (y * ((z - t) / z)); elseif (z <= 1.3e-15) tmp = x + (y * (t / (a - z))); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.0], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-15], N[(x + N[(y * N[(t / N[(a - z), $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}\;z \leq -9:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-15}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -9Initial program 99.9%
Taylor expanded in a around 0 87.1%
if -9 < z < 1.30000000000000002e-15Initial program 94.1%
Taylor expanded in t around inf 89.8%
associate-*r/89.8%
mul-1-neg89.8%
distribute-lft-neg-out89.8%
*-commutative89.8%
*-lft-identity89.8%
times-frac86.9%
/-rgt-identity86.9%
distribute-neg-frac86.9%
distribute-neg-frac286.9%
neg-sub086.9%
sub-neg86.9%
+-commutative86.9%
associate--r+86.9%
neg-sub086.9%
remove-double-neg86.9%
Simplified86.9%
if 1.30000000000000002e-15 < z Initial program 99.9%
Taylor expanded in a around 0 78.8%
associate-/l*88.4%
div-sub88.4%
*-inverses88.4%
Simplified88.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -185.0) (not (<= z 6.8e+59))) (+ x y) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -185.0) || !(z <= 6.8e+59)) {
tmp = x + y;
} 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 <= (-185.0d0)) .or. (.not. (z <= 6.8d+59))) then
tmp = x + y
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 <= -185.0) || !(z <= 6.8e+59)) {
tmp = x + y;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -185.0) or not (z <= 6.8e+59): tmp = x + y else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -185.0) || !(z <= 6.8e+59)) tmp = Float64(x + y); 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 <= -185.0) || ~((z <= 6.8e+59))) tmp = x + y; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -185.0], N[Not[LessEqual[z, 6.8e+59]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -185 \lor \neg \left(z \leq 6.8 \cdot 10^{+59}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -185 or 6.80000000000000012e59 < z Initial program 99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -185 < z < 6.80000000000000012e59Initial program 94.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 -140.0) (not (<= z 5.8e+63))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -140.0) || !(z <= 5.8e+63)) {
tmp = x + y;
} 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 <= (-140.0d0)) .or. (.not. (z <= 5.8d+63))) then
tmp = x + y
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 <= -140.0) || !(z <= 5.8e+63)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -140.0) or not (z <= 5.8e+63): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -140.0) || !(z <= 5.8e+63)) tmp = Float64(x + y); 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 <= -140.0) || ~((z <= 5.8e+63))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -140.0], N[Not[LessEqual[z, 5.8e+63]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -140 \lor \neg \left(z \leq 5.8 \cdot 10^{+63}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -140 or 5.7999999999999999e63 < z Initial program 99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -140 < z < 5.7999999999999999e63Initial program 94.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 -14.5) (not (<= z 3.9e+63))) (+ x y) (+ x (/ (* t y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -14.5) || !(z <= 3.9e+63)) {
tmp = x + y;
} 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 <= (-14.5d0)) .or. (.not. (z <= 3.9d+63))) then
tmp = x + y
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 <= -14.5) || !(z <= 3.9e+63)) {
tmp = x + y;
} else {
tmp = x + ((t * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -14.5) or not (z <= 3.9e+63): tmp = x + y else: tmp = x + ((t * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -14.5) || !(z <= 3.9e+63)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(t * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -14.5) || ~((z <= 3.9e+63))) tmp = x + y; else tmp = x + ((t * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -14.5], N[Not[LessEqual[z, 3.9e+63]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -14.5 \lor \neg \left(z \leq 3.9 \cdot 10^{+63}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\end{array}
\end{array}
if z < -14.5 or 3.9e63 < z Initial program 99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -14.5 < z < 3.9e63Initial program 94.7%
Taylor expanded in z around 0 72.6%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.0) (not (<= z 7e+59))) (+ x y) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.0) || !(z <= 7e+59)) {
tmp = x + y;
} 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 <= (-9.0d0)) .or. (.not. (z <= 7d+59))) then
tmp = x + y
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 <= -9.0) || !(z <= 7e+59)) {
tmp = x + y;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.0) or not (z <= 7e+59): tmp = x + y else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.0) || !(z <= 7e+59)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.0) || ~((z <= 7e+59))) tmp = x + y; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.0], N[Not[LessEqual[z, 7e+59]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \lor \neg \left(z \leq 7 \cdot 10^{+59}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -9 or 7e59 < z Initial program 99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -9 < z < 7e59Initial program 94.7%
Taylor expanded in z around 0 72.5%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.1e-138) x (if (<= x 1.8e-213) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.1e-138) {
tmp = x;
} else if (x <= 1.8e-213) {
tmp = y;
} 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 (x <= (-2.1d-138)) then
tmp = x
else if (x <= 1.8d-213) then
tmp = y
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 (x <= -2.1e-138) {
tmp = x;
} else if (x <= 1.8e-213) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.1e-138: tmp = x elif x <= 1.8e-213: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.1e-138) tmp = x; elseif (x <= 1.8e-213) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.1e-138) tmp = x; elseif (x <= 1.8e-213) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.1e-138], x, If[LessEqual[x, 1.8e-213], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-138}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-213}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.09999999999999986e-138 or 1.8e-213 < x Initial program 97.6%
Taylor expanded in x around inf 59.2%
if -2.09999999999999986e-138 < x < 1.8e-213Initial program 93.8%
Taylor expanded in z around inf 47.2%
+-commutative47.2%
Simplified47.2%
Taylor expanded in y around inf 34.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.35e+155) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e+155) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.35d+155)) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e+155) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.35e+155: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.35e+155) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.35e+155) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.35e+155], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.34999999999999997e155Initial program 99.8%
Taylor expanded in x around inf 90.3%
if -1.34999999999999997e155 < a Initial program 96.5%
Taylor expanded in z around inf 57.8%
+-commutative57.8%
Simplified57.8%
Final simplification61.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 96.9%
Taylor expanded in x around inf 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:renderAxisLine 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)))))