
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 97.7%
associate-*r/87.5%
Simplified87.5%
*-commutative87.5%
associate-/l*98.1%
Applied egg-rr98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z (- t a))))))
(if (<= t -1.52e+240)
(+ x y)
(if (<= t -1.8e+86)
t_1
(if (<= t -4.3e-10)
(+ x y)
(if (<= t 1e-124)
(+ x (* z (/ y a)))
(if (<= t 7.5e+42) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / (t - a)));
double tmp;
if (t <= -1.52e+240) {
tmp = x + y;
} else if (t <= -1.8e+86) {
tmp = t_1;
} else if (t <= -4.3e-10) {
tmp = x + y;
} else if (t <= 1e-124) {
tmp = x + (z * (y / a));
} else if (t <= 7.5e+42) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y * (z / (t - a)))
if (t <= (-1.52d+240)) then
tmp = x + y
else if (t <= (-1.8d+86)) then
tmp = t_1
else if (t <= (-4.3d-10)) then
tmp = x + y
else if (t <= 1d-124) then
tmp = x + (z * (y / a))
else if (t <= 7.5d+42) then
tmp = t_1
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 t_1 = x - (y * (z / (t - a)));
double tmp;
if (t <= -1.52e+240) {
tmp = x + y;
} else if (t <= -1.8e+86) {
tmp = t_1;
} else if (t <= -4.3e-10) {
tmp = x + y;
} else if (t <= 1e-124) {
tmp = x + (z * (y / a));
} else if (t <= 7.5e+42) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / (t - a))) tmp = 0 if t <= -1.52e+240: tmp = x + y elif t <= -1.8e+86: tmp = t_1 elif t <= -4.3e-10: tmp = x + y elif t <= 1e-124: tmp = x + (z * (y / a)) elif t <= 7.5e+42: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / Float64(t - a)))) tmp = 0.0 if (t <= -1.52e+240) tmp = Float64(x + y); elseif (t <= -1.8e+86) tmp = t_1; elseif (t <= -4.3e-10) tmp = Float64(x + y); elseif (t <= 1e-124) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (t <= 7.5e+42) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / (t - a))); tmp = 0.0; if (t <= -1.52e+240) tmp = x + y; elseif (t <= -1.8e+86) tmp = t_1; elseif (t <= -4.3e-10) tmp = x + y; elseif (t <= 1e-124) tmp = x + (z * (y / a)); elseif (t <= 7.5e+42) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.52e+240], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.8e+86], t$95$1, If[LessEqual[t, -4.3e-10], N[(x + y), $MachinePrecision], If[LessEqual[t, 1e-124], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+42], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{t - a}\\
\mathbf{if}\;t \leq -1.52 \cdot 10^{+240}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 10^{-124}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.5200000000000001e240 or -1.80000000000000003e86 < t < -4.30000000000000014e-10 or 7.50000000000000041e42 < t Initial program 100.0%
Taylor expanded in t around inf 81.9%
+-commutative81.9%
Simplified81.9%
if -1.5200000000000001e240 < t < -1.80000000000000003e86 or 9.99999999999999933e-125 < t < 7.50000000000000041e42Initial program 99.8%
Taylor expanded in z around inf 84.9%
associate-/l*90.3%
Simplified90.3%
if -4.30000000000000014e-10 < t < 9.99999999999999933e-125Initial program 93.8%
associate-*r/94.9%
Simplified94.9%
*-commutative94.9%
associate-/l*99.3%
Applied egg-rr99.3%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-/l*94.2%
Simplified94.2%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z (- t a))))))
(if (<= z -1.5e+22)
t_1
(if (<= z 2.2e+17)
(+ x (* y (/ t (- t a))))
(if (<= z 5.2e+35)
(+ x (* y (/ (- z t) a)))
(if (<= z 5.5e+83) (- x (* y (+ (/ z t) -1.0))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / (t - a)));
double tmp;
if (z <= -1.5e+22) {
tmp = t_1;
} else if (z <= 2.2e+17) {
tmp = x + (y * (t / (t - a)));
} else if (z <= 5.2e+35) {
tmp = x + (y * ((z - t) / a));
} else if (z <= 5.5e+83) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (z / (t - a)))
if (z <= (-1.5d+22)) then
tmp = t_1
else if (z <= 2.2d+17) then
tmp = x + (y * (t / (t - a)))
else if (z <= 5.2d+35) then
tmp = x + (y * ((z - t) / a))
else if (z <= 5.5d+83) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / (t - a)));
double tmp;
if (z <= -1.5e+22) {
tmp = t_1;
} else if (z <= 2.2e+17) {
tmp = x + (y * (t / (t - a)));
} else if (z <= 5.2e+35) {
tmp = x + (y * ((z - t) / a));
} else if (z <= 5.5e+83) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / (t - a))) tmp = 0 if z <= -1.5e+22: tmp = t_1 elif z <= 2.2e+17: tmp = x + (y * (t / (t - a))) elif z <= 5.2e+35: tmp = x + (y * ((z - t) / a)) elif z <= 5.5e+83: tmp = x - (y * ((z / t) + -1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / Float64(t - a)))) tmp = 0.0 if (z <= -1.5e+22) tmp = t_1; elseif (z <= 2.2e+17) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); elseif (z <= 5.2e+35) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (z <= 5.5e+83) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / (t - a))); tmp = 0.0; if (z <= -1.5e+22) tmp = t_1; elseif (z <= 2.2e+17) tmp = x + (y * (t / (t - a))); elseif (z <= 5.2e+35) tmp = x + (y * ((z - t) / a)); elseif (z <= 5.5e+83) tmp = x - (y * ((z / t) + -1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+22], t$95$1, If[LessEqual[z, 2.2e+17], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+35], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+83], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+35}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+83}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5e22 or 5.4999999999999996e83 < z Initial program 96.1%
Taylor expanded in z around inf 83.8%
associate-/l*89.6%
Simplified89.6%
if -1.5e22 < z < 2.2e17Initial program 98.6%
Taylor expanded in z around 0 83.2%
mul-1-neg83.2%
unsub-neg83.2%
*-commutative83.2%
associate-/l*93.4%
Simplified93.4%
if 2.2e17 < z < 5.20000000000000013e35Initial program 100.0%
Taylor expanded in a around inf 99.8%
+-commutative99.8%
associate-/l*100.0%
Simplified100.0%
if 5.20000000000000013e35 < z < 5.4999999999999996e83Initial program 100.0%
Taylor expanded in a around 0 85.1%
mul-1-neg85.1%
unsub-neg85.1%
associate-/l*97.2%
div-sub97.2%
sub-neg97.2%
*-inverses97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.8e+122)
(+ x y)
(if (<= t -3.5e+36)
(- x (* z (/ y t)))
(if (<= t 1.45e+48) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.8e+122) {
tmp = x + y;
} else if (t <= -3.5e+36) {
tmp = x - (z * (y / t));
} else if (t <= 1.45e+48) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.8d+122)) then
tmp = x + y
else if (t <= (-3.5d+36)) then
tmp = x - (z * (y / t))
else if (t <= 1.45d+48) then
tmp = x + (z * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.8e+122) {
tmp = x + y;
} else if (t <= -3.5e+36) {
tmp = x - (z * (y / t));
} else if (t <= 1.45e+48) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.8e+122: tmp = x + y elif t <= -3.5e+36: tmp = x - (z * (y / t)) elif t <= 1.45e+48: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.8e+122) tmp = Float64(x + y); elseif (t <= -3.5e+36) tmp = Float64(x - Float64(z * Float64(y / t))); elseif (t <= 1.45e+48) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.8e+122) tmp = x + y; elseif (t <= -3.5e+36) tmp = x - (z * (y / t)); elseif (t <= 1.45e+48) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.8e+122], N[(x + y), $MachinePrecision], If[LessEqual[t, -3.5e+36], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+48], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+122}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{+36}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+48}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.8000000000000002e122 or 1.4499999999999999e48 < t Initial program 99.9%
Taylor expanded in t around inf 86.4%
+-commutative86.4%
Simplified86.4%
if -5.8000000000000002e122 < t < -3.4999999999999998e36Initial program 99.9%
Taylor expanded in z around inf 74.9%
associate-/l*80.8%
Simplified80.8%
Taylor expanded in a around 0 74.4%
mul-1-neg74.4%
unsub-neg74.4%
associate-/l*80.4%
Simplified80.4%
*-commutative80.4%
associate-*l/74.4%
Applied egg-rr74.4%
associate-/l*80.5%
*-commutative80.5%
Applied egg-rr80.5%
if -3.4999999999999998e36 < t < 1.4499999999999999e48Initial program 96.1%
associate-*r/95.6%
Simplified95.6%
*-commutative95.6%
associate-/l*98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 81.2%
*-commutative81.2%
associate-/l*84.8%
Simplified84.8%
Final simplification85.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.8e+122)
(+ x y)
(if (<= t -1.95e+40)
(- x (* y (/ z t)))
(if (<= t 1.7e+47) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e+122) {
tmp = x + y;
} else if (t <= -1.95e+40) {
tmp = x - (y * (z / t));
} else if (t <= 1.7e+47) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.8d+122)) then
tmp = x + y
else if (t <= (-1.95d+40)) then
tmp = x - (y * (z / t))
else if (t <= 1.7d+47) then
tmp = x + (z * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e+122) {
tmp = x + y;
} else if (t <= -1.95e+40) {
tmp = x - (y * (z / t));
} else if (t <= 1.7e+47) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e+122: tmp = x + y elif t <= -1.95e+40: tmp = x - (y * (z / t)) elif t <= 1.7e+47: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e+122) tmp = Float64(x + y); elseif (t <= -1.95e+40) tmp = Float64(x - Float64(y * Float64(z / t))); elseif (t <= 1.7e+47) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.8e+122) tmp = x + y; elseif (t <= -1.95e+40) tmp = x - (y * (z / t)); elseif (t <= 1.7e+47) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e+122], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.95e+40], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+47], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+122}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{+40}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.7999999999999998e122 or 1.6999999999999999e47 < t Initial program 99.9%
Taylor expanded in t around inf 86.4%
+-commutative86.4%
Simplified86.4%
if -3.7999999999999998e122 < t < -1.95e40Initial program 99.9%
Taylor expanded in z around inf 74.9%
associate-/l*80.8%
Simplified80.8%
Taylor expanded in a around 0 74.4%
mul-1-neg74.4%
unsub-neg74.4%
associate-/l*80.4%
Simplified80.4%
if -1.95e40 < t < 1.6999999999999999e47Initial program 96.1%
associate-*r/95.6%
Simplified95.6%
*-commutative95.6%
associate-/l*98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 81.2%
*-commutative81.2%
associate-/l*84.8%
Simplified84.8%
Final simplification85.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.8e-15)
(+ x y)
(if (<= t -5.8e-83)
(+ x (/ (* z y) a))
(if (<= t 3.6e+48) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e-15) {
tmp = x + y;
} else if (t <= -5.8e-83) {
tmp = x + ((z * y) / a);
} else if (t <= 3.6e+48) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.8d-15)) then
tmp = x + y
else if (t <= (-5.8d-83)) then
tmp = x + ((z * y) / a)
else if (t <= 3.6d+48) then
tmp = x + (z * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e-15) {
tmp = x + y;
} else if (t <= -5.8e-83) {
tmp = x + ((z * y) / a);
} else if (t <= 3.6e+48) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.8e-15: tmp = x + y elif t <= -5.8e-83: tmp = x + ((z * y) / a) elif t <= 3.6e+48: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.8e-15) tmp = Float64(x + y); elseif (t <= -5.8e-83) tmp = Float64(x + Float64(Float64(z * y) / a)); elseif (t <= 3.6e+48) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.8e-15) tmp = x + y; elseif (t <= -5.8e-83) tmp = x + ((z * y) / a); elseif (t <= 3.6e+48) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.8e-15], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.8e-83], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+48], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-15}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-83}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+48}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -4.7999999999999999e-15 or 3.59999999999999983e48 < t Initial program 99.9%
Taylor expanded in t around inf 80.1%
+-commutative80.1%
Simplified80.1%
if -4.7999999999999999e-15 < t < -5.7999999999999998e-83Initial program 99.9%
Taylor expanded in t around 0 99.9%
if -5.7999999999999998e-83 < t < 3.59999999999999983e48Initial program 95.3%
associate-*r/94.7%
Simplified94.7%
*-commutative94.7%
associate-/l*98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 83.4%
*-commutative83.4%
associate-/l*88.1%
Simplified88.1%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.2e-55) (not (<= a 4e-54))) (- x (* y (/ z (- t a)))) (- x (* y (+ (/ z t) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e-55) || !(a <= 4e-54)) {
tmp = x - (y * (z / (t - a)));
} else {
tmp = x - (y * ((z / t) + -1.0));
}
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 <= (-7.2d-55)) .or. (.not. (a <= 4d-54))) then
tmp = x - (y * (z / (t - a)))
else
tmp = x - (y * ((z / t) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e-55) || !(a <= 4e-54)) {
tmp = x - (y * (z / (t - a)));
} else {
tmp = x - (y * ((z / t) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.2e-55) or not (a <= 4e-54): tmp = x - (y * (z / (t - a))) else: tmp = x - (y * ((z / t) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.2e-55) || !(a <= 4e-54)) tmp = Float64(x - Float64(y * Float64(z / Float64(t - a)))); else tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.2e-55) || ~((a <= 4e-54))) tmp = x - (y * (z / (t - a))); else tmp = x - (y * ((z / t) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.2e-55], N[Not[LessEqual[a, 4e-54]], $MachinePrecision]], N[(x - N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-55} \lor \neg \left(a \leq 4 \cdot 10^{-54}\right):\\
\;\;\;\;x - y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\end{array}
\end{array}
if a < -7.2000000000000001e-55 or 4.0000000000000001e-54 < a Initial program 98.8%
Taylor expanded in z around inf 81.4%
associate-/l*85.3%
Simplified85.3%
if -7.2000000000000001e-55 < a < 4.0000000000000001e-54Initial program 95.6%
Taylor expanded in a around 0 73.4%
mul-1-neg73.4%
unsub-neg73.4%
associate-/l*87.7%
div-sub87.7%
sub-neg87.7%
*-inverses87.7%
metadata-eval87.7%
Simplified87.7%
Final simplification86.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.8e+122) (not (<= t 5e+49))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.8e+122) || !(t <= 5e+49)) {
tmp = x + y;
} else {
tmp = x + (z * (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 ((t <= (-5.8d+122)) .or. (.not. (t <= 5d+49))) then
tmp = x + y
else
tmp = x + (z * (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 ((t <= -5.8e+122) || !(t <= 5e+49)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.8e+122) or not (t <= 5e+49): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.8e+122) || !(t <= 5e+49)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.8e+122) || ~((t <= 5e+49))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.8e+122], N[Not[LessEqual[t, 5e+49]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+122} \lor \neg \left(t \leq 5 \cdot 10^{+49}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -5.8000000000000002e122 or 5.0000000000000004e49 < t Initial program 99.9%
Taylor expanded in t around inf 86.4%
+-commutative86.4%
Simplified86.4%
if -5.8000000000000002e122 < t < 5.0000000000000004e49Initial program 96.5%
associate-*r/95.5%
Simplified95.5%
*-commutative95.5%
associate-/l*98.4%
Applied egg-rr98.4%
Taylor expanded in t around 0 78.2%
*-commutative78.2%
associate-/l*81.5%
Simplified81.5%
Final simplification83.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e+193) x (if (<= a -7e+163) (/ y (/ a z)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+193) {
tmp = x;
} else if (a <= -7e+163) {
tmp = y / (a / 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 (a <= (-1.4d+193)) then
tmp = x
else if (a <= (-7d+163)) then
tmp = y / (a / 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 (a <= -1.4e+193) {
tmp = x;
} else if (a <= -7e+163) {
tmp = y / (a / z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e+193: tmp = x elif a <= -7e+163: tmp = y / (a / z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+193) tmp = x; elseif (a <= -7e+163) tmp = Float64(y / Float64(a / z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e+193) tmp = x; elseif (a <= -7e+163) tmp = y / (a / z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+193], x, If[LessEqual[a, -7e+163], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+193}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7 \cdot 10^{+163}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.39999999999999993e193Initial program 99.9%
Taylor expanded in x around inf 75.3%
if -1.39999999999999993e193 < a < -7.0000000000000005e163Initial program 99.2%
Taylor expanded in t around 0 83.4%
+-commutative83.4%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in y around inf 80.7%
Taylor expanded in z around 0 66.9%
associate-/l*82.7%
Simplified82.7%
clear-num83.0%
un-div-inv83.2%
Applied egg-rr83.2%
if -7.0000000000000005e163 < a Initial program 97.4%
Taylor expanded in t around inf 67.9%
+-commutative67.9%
Simplified67.9%
Final simplification69.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e+193) x (if (<= a -6.5e+163) (* y (/ z a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+193) {
tmp = x;
} else if (a <= -6.5e+163) {
tmp = y * (z / a);
} 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.4d+193)) then
tmp = x
else if (a <= (-6.5d+163)) then
tmp = y * (z / a)
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.4e+193) {
tmp = x;
} else if (a <= -6.5e+163) {
tmp = y * (z / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e+193: tmp = x elif a <= -6.5e+163: tmp = y * (z / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+193) tmp = x; elseif (a <= -6.5e+163) tmp = Float64(y * Float64(z / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e+193) tmp = x; elseif (a <= -6.5e+163) tmp = y * (z / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+193], x, If[LessEqual[a, -6.5e+163], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+193}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{+163}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.39999999999999993e193Initial program 99.9%
Taylor expanded in x around inf 75.3%
if -1.39999999999999993e193 < a < -6.4999999999999998e163Initial program 99.2%
Taylor expanded in t around 0 83.4%
+-commutative83.4%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in y around inf 80.7%
Taylor expanded in z around 0 66.9%
associate-/l*82.7%
Simplified82.7%
if -6.4999999999999998e163 < a Initial program 97.4%
Taylor expanded in t around inf 67.9%
+-commutative67.9%
Simplified67.9%
Final simplification69.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.8e-10) (not (<= t -6.6e-299))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.8e-10) || !(t <= -6.6e-299)) {
tmp = x + 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 ((t <= (-1.8d-10)) .or. (.not. (t <= (-6.6d-299)))) then
tmp = x + 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 ((t <= -1.8e-10) || !(t <= -6.6e-299)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.8e-10) or not (t <= -6.6e-299): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.8e-10) || !(t <= -6.6e-299)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.8e-10) || ~((t <= -6.6e-299))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.8e-10], N[Not[LessEqual[t, -6.6e-299]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-10} \lor \neg \left(t \leq -6.6 \cdot 10^{-299}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.8e-10 or -6.6000000000000004e-299 < t Initial program 98.5%
Taylor expanded in t around inf 70.8%
+-commutative70.8%
Simplified70.8%
if -1.8e-10 < t < -6.6000000000000004e-299Initial program 95.0%
Taylor expanded in x around inf 60.1%
Final simplification68.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -4.2e+138) y (if (<= y 1.76e+137) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.2e+138) {
tmp = y;
} else if (y <= 1.76e+137) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-4.2d+138)) then
tmp = y
else if (y <= 1.76d+137) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.2e+138) {
tmp = y;
} else if (y <= 1.76e+137) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.2e+138: tmp = y elif y <= 1.76e+137: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.2e+138) tmp = y; elseif (y <= 1.76e+137) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.2e+138) tmp = y; elseif (y <= 1.76e+137) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.2e+138], y, If[LessEqual[y, 1.76e+137], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+138}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.76 \cdot 10^{+137}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -4.20000000000000014e138 or 1.76e137 < y Initial program 96.8%
associate-*r/65.2%
Simplified65.2%
*-commutative65.2%
associate-/l*96.9%
Applied egg-rr96.9%
Taylor expanded in a around 0 50.1%
associate-*r/50.1%
neg-mul-150.1%
Simplified50.1%
Taylor expanded in x around 0 28.4%
mul-1-neg28.4%
*-commutative28.4%
associate-*r/50.1%
sub-neg50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in x around 0 26.8%
mul-1-neg26.8%
associate-/l*48.7%
distribute-rgt-neg-in48.7%
div-sub48.7%
sub-neg48.7%
*-inverses48.7%
metadata-eval48.7%
distribute-neg-in48.7%
metadata-eval48.7%
+-commutative48.7%
sub-neg48.7%
Simplified48.7%
Taylor expanded in z around 0 33.7%
if -4.20000000000000014e138 < y < 1.76e137Initial program 98.0%
Taylor expanded in x around inf 71.2%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 97.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.7%
Taylor expanded in x around inf 56.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024105
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))