
(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 (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 97.6%
+-commutative97.6%
fma-def97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- z a)))))
(if (<= z -8.2e+178)
(+ y x)
(if (<= z -1.65e+61)
(- x (/ y (/ z t)))
(if (<= z -3.3e+32)
(+ y x)
(if (<= z -4.5e-133)
t_1
(if (<= z 2.9e-64)
(+ x (/ y (/ a t)))
(if (<= z 26500000.0)
t_1
(if (<= z 1.1e+16) (+ x (* y (/ t a))) (+ y x))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (z - a));
double tmp;
if (z <= -8.2e+178) {
tmp = y + x;
} else if (z <= -1.65e+61) {
tmp = x - (y / (z / t));
} else if (z <= -3.3e+32) {
tmp = y + x;
} else if (z <= -4.5e-133) {
tmp = t_1;
} else if (z <= 2.9e-64) {
tmp = x + (y / (a / t));
} else if (z <= 26500000.0) {
tmp = t_1;
} else if (z <= 1.1e+16) {
tmp = x + (y * (t / a));
} 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) :: t_1
real(8) :: tmp
t_1 = (z - t) * (y / (z - a))
if (z <= (-8.2d+178)) then
tmp = y + x
else if (z <= (-1.65d+61)) then
tmp = x - (y / (z / t))
else if (z <= (-3.3d+32)) then
tmp = y + x
else if (z <= (-4.5d-133)) then
tmp = t_1
else if (z <= 2.9d-64) then
tmp = x + (y / (a / t))
else if (z <= 26500000.0d0) then
tmp = t_1
else if (z <= 1.1d+16) then
tmp = x + (y * (t / a))
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 t_1 = (z - t) * (y / (z - a));
double tmp;
if (z <= -8.2e+178) {
tmp = y + x;
} else if (z <= -1.65e+61) {
tmp = x - (y / (z / t));
} else if (z <= -3.3e+32) {
tmp = y + x;
} else if (z <= -4.5e-133) {
tmp = t_1;
} else if (z <= 2.9e-64) {
tmp = x + (y / (a / t));
} else if (z <= 26500000.0) {
tmp = t_1;
} else if (z <= 1.1e+16) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (z - a)) tmp = 0 if z <= -8.2e+178: tmp = y + x elif z <= -1.65e+61: tmp = x - (y / (z / t)) elif z <= -3.3e+32: tmp = y + x elif z <= -4.5e-133: tmp = t_1 elif z <= 2.9e-64: tmp = x + (y / (a / t)) elif z <= 26500000.0: tmp = t_1 elif z <= 1.1e+16: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a))) tmp = 0.0 if (z <= -8.2e+178) tmp = Float64(y + x); elseif (z <= -1.65e+61) tmp = Float64(x - Float64(y / Float64(z / t))); elseif (z <= -3.3e+32) tmp = Float64(y + x); elseif (z <= -4.5e-133) tmp = t_1; elseif (z <= 2.9e-64) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 26500000.0) tmp = t_1; elseif (z <= 1.1e+16) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (z - a)); tmp = 0.0; if (z <= -8.2e+178) tmp = y + x; elseif (z <= -1.65e+61) tmp = x - (y / (z / t)); elseif (z <= -3.3e+32) tmp = y + x; elseif (z <= -4.5e-133) tmp = t_1; elseif (z <= 2.9e-64) tmp = x + (y / (a / t)); elseif (z <= 26500000.0) tmp = t_1; elseif (z <= 1.1e+16) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+178], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.65e+61], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e+32], N[(y + x), $MachinePrecision], If[LessEqual[z, -4.5e-133], t$95$1, If[LessEqual[z, 2.9e-64], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 26500000.0], t$95$1, If[LessEqual[z, 1.1e+16], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+178}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{+61}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{+32}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-64}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 26500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+16}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -8.19999999999999993e178 or -1.6499999999999999e61 < z < -3.3000000000000002e32 or 1.1e16 < z Initial program 100.0%
Taylor expanded in z around inf 81.4%
if -8.19999999999999993e178 < z < -1.6499999999999999e61Initial program 99.8%
Taylor expanded in t around inf 86.4%
neg-mul-186.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in z around inf 65.1%
+-commutative65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-/l*81.9%
Simplified81.9%
if -3.3000000000000002e32 < z < -4.50000000000000009e-133 or 2.8999999999999999e-64 < z < 2.65e7Initial program 92.9%
+-commutative92.9%
associate-*r/90.9%
associate-*l/97.7%
*-commutative97.7%
fma-def97.7%
Simplified97.7%
clear-num97.4%
associate-/r/97.6%
Applied egg-rr97.6%
Taylor expanded in y around -inf 68.2%
*-commutative68.2%
associate-*r/74.9%
Simplified74.9%
if -4.50000000000000009e-133 < z < 2.8999999999999999e-64Initial program 96.9%
Taylor expanded in z around 0 81.7%
associate-/l*85.5%
Simplified85.5%
if 2.65e7 < z < 1.1e16Initial program 100.0%
Taylor expanded in z around 0 100.0%
Final simplification82.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.28e+166)
(+ y x)
(if (<= z -3.7e+68)
(- x (* y (/ t z)))
(if (<= z -6e+42)
(+ y x)
(if (<= z 4.2e+16) (+ x (/ y (/ a t))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.28e+166) {
tmp = y + x;
} else if (z <= -3.7e+68) {
tmp = x - (y * (t / z));
} else if (z <= -6e+42) {
tmp = y + x;
} else if (z <= 4.2e+16) {
tmp = x + (y / (a / t));
} 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.28d+166)) then
tmp = y + x
else if (z <= (-3.7d+68)) then
tmp = x - (y * (t / z))
else if (z <= (-6d+42)) then
tmp = y + x
else if (z <= 4.2d+16) then
tmp = x + (y / (a / t))
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.28e+166) {
tmp = y + x;
} else if (z <= -3.7e+68) {
tmp = x - (y * (t / z));
} else if (z <= -6e+42) {
tmp = y + x;
} else if (z <= 4.2e+16) {
tmp = x + (y / (a / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.28e+166: tmp = y + x elif z <= -3.7e+68: tmp = x - (y * (t / z)) elif z <= -6e+42: tmp = y + x elif z <= 4.2e+16: tmp = x + (y / (a / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.28e+166) tmp = Float64(y + x); elseif (z <= -3.7e+68) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= -6e+42) tmp = Float64(y + x); elseif (z <= 4.2e+16) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.28e+166) tmp = y + x; elseif (z <= -3.7e+68) tmp = x - (y * (t / z)); elseif (z <= -6e+42) tmp = y + x; elseif (z <= 4.2e+16) tmp = x + (y / (a / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.28e+166], N[(y + x), $MachinePrecision], If[LessEqual[z, -3.7e+68], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e+42], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.2e+16], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{+166}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{+68}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+42}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.28e166 or -3.69999999999999998e68 < z < -6.00000000000000058e42 or 4.2e16 < z Initial program 100.0%
Taylor expanded in z around inf 81.8%
if -1.28e166 < z < -3.69999999999999998e68Initial program 99.8%
Taylor expanded in t around inf 86.4%
neg-mul-186.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in x around 0 69.6%
+-commutative69.6%
mul-1-neg69.6%
associate-*r/86.4%
sub-neg86.4%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in z around inf 65.1%
associate-*r/81.9%
Simplified81.9%
if -6.00000000000000058e42 < z < 4.2e16Initial program 95.8%
Taylor expanded in z around 0 70.3%
associate-/l*74.8%
Simplified74.8%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e+169)
(+ y x)
(if (<= z -1.7e+60)
(- x (/ y (/ z t)))
(if (<= z -2.3e+44)
(+ y x)
(if (<= z 4.1e+16) (+ x (/ y (/ a t))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+169) {
tmp = y + x;
} else if (z <= -1.7e+60) {
tmp = x - (y / (z / t));
} else if (z <= -2.3e+44) {
tmp = y + x;
} else if (z <= 4.1e+16) {
tmp = x + (y / (a / t));
} 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+169)) then
tmp = y + x
else if (z <= (-1.7d+60)) then
tmp = x - (y / (z / t))
else if (z <= (-2.3d+44)) then
tmp = y + x
else if (z <= 4.1d+16) then
tmp = x + (y / (a / t))
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+169) {
tmp = y + x;
} else if (z <= -1.7e+60) {
tmp = x - (y / (z / t));
} else if (z <= -2.3e+44) {
tmp = y + x;
} else if (z <= 4.1e+16) {
tmp = x + (y / (a / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e+169: tmp = y + x elif z <= -1.7e+60: tmp = x - (y / (z / t)) elif z <= -2.3e+44: tmp = y + x elif z <= 4.1e+16: tmp = x + (y / (a / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e+169) tmp = Float64(y + x); elseif (z <= -1.7e+60) tmp = Float64(x - Float64(y / Float64(z / t))); elseif (z <= -2.3e+44) tmp = Float64(y + x); elseif (z <= 4.1e+16) tmp = Float64(x + Float64(y / Float64(a / t))); 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+169) tmp = y + x; elseif (z <= -1.7e+60) tmp = x - (y / (z / t)); elseif (z <= -2.3e+44) tmp = y + x; elseif (z <= 4.1e+16) tmp = x + (y / (a / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+169], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.7e+60], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e+44], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.1e+16], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+60}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+44}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.85e169 or -1.7e60 < z < -2.30000000000000004e44 or 4.1e16 < z Initial program 100.0%
Taylor expanded in z around inf 81.8%
if -1.85e169 < z < -1.7e60Initial program 99.8%
Taylor expanded in t around inf 86.4%
neg-mul-186.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in z around inf 65.1%
+-commutative65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-/l*81.9%
Simplified81.9%
if -2.30000000000000004e44 < z < 4.1e16Initial program 95.8%
Taylor expanded in z around 0 70.3%
associate-/l*74.8%
Simplified74.8%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -1.5e-31)
t_1
(if (<= z -3.8e-133)
(* (- z t) (/ y (- z a)))
(if (<= z 1.65e-43) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -1.5e-31) {
tmp = t_1;
} else if (z <= -3.8e-133) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 1.65e-43) {
tmp = x + (y / (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 * (1.0d0 - (t / z)))
if (z <= (-1.5d-31)) then
tmp = t_1
else if (z <= (-3.8d-133)) then
tmp = (z - t) * (y / (z - a))
else if (z <= 1.65d-43) then
tmp = x + (y / (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 * (1.0 - (t / z)));
double tmp;
if (z <= -1.5e-31) {
tmp = t_1;
} else if (z <= -3.8e-133) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 1.65e-43) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -1.5e-31: tmp = t_1 elif z <= -3.8e-133: tmp = (z - t) * (y / (z - a)) elif z <= 1.65e-43: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -1.5e-31) tmp = t_1; elseif (z <= -3.8e-133) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 1.65e-43) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -1.5e-31) tmp = t_1; elseif (z <= -3.8e-133) tmp = (z - t) * (y / (z - a)); elseif (z <= 1.65e-43) tmp = x + (y / (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[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-31], t$95$1, If[LessEqual[z, -3.8e-133], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-43], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-133}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.49999999999999991e-31 or 1.65000000000000008e-43 < z Initial program 99.9%
Taylor expanded in a around 0 84.4%
div-sub84.4%
*-inverses84.4%
Simplified84.4%
if -1.49999999999999991e-31 < z < -3.8000000000000003e-133Initial program 84.6%
+-commutative84.6%
associate-*r/84.9%
associate-*l/99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
clear-num99.7%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around -inf 70.1%
*-commutative70.1%
associate-*r/84.9%
Simplified84.9%
if -3.8000000000000003e-133 < z < 1.65000000000000008e-43Initial program 96.9%
Taylor expanded in z around 0 80.4%
associate-/l*85.0%
Simplified85.0%
Final simplification84.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3e-30)
(+ x (* y (- 1.0 (/ t z))))
(if (<= z -4.5e-134)
(* (- z t) (/ y (- z a)))
(if (<= z 1.25e-43) (+ x (/ y (/ a t))) (+ x (/ y (/ z (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-30) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= -4.5e-134) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 1.25e-43) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / (z / (z - t)));
}
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 <= (-3d-30)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= (-4.5d-134)) then
tmp = (z - t) * (y / (z - a))
else if (z <= 1.25d-43) then
tmp = x + (y / (a / t))
else
tmp = x + (y / (z / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-30) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= -4.5e-134) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 1.25e-43) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e-30: tmp = x + (y * (1.0 - (t / z))) elif z <= -4.5e-134: tmp = (z - t) * (y / (z - a)) elif z <= 1.25e-43: tmp = x + (y / (a / t)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e-30) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= -4.5e-134) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 1.25e-43) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e-30) tmp = x + (y * (1.0 - (t / z))); elseif (z <= -4.5e-134) tmp = (z - t) * (y / (z - a)); elseif (z <= 1.25e-43) tmp = x + (y / (a / t)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e-30], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.5e-134], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-43], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-30}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-134}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if z < -2.9999999999999999e-30Initial program 99.9%
Taylor expanded in a around 0 84.3%
div-sub84.3%
*-inverses84.3%
Simplified84.3%
if -2.9999999999999999e-30 < z < -4.5000000000000005e-134Initial program 84.6%
+-commutative84.6%
associate-*r/84.9%
associate-*l/99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
clear-num99.7%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around -inf 70.1%
*-commutative70.1%
associate-*r/84.9%
Simplified84.9%
if -4.5000000000000005e-134 < z < 1.25000000000000005e-43Initial program 96.9%
Taylor expanded in z around 0 80.4%
associate-/l*85.0%
Simplified85.0%
if 1.25000000000000005e-43 < z Initial program 99.9%
Taylor expanded in a around 0 65.8%
+-commutative65.8%
*-commutative65.8%
associate-/l*84.5%
Simplified84.5%
Final simplification84.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.5e-47) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 7.5e+16) (- x (/ (* y t) (- z a))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e-47) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 7.5e+16) {
tmp = x - ((y * t) / (z - a));
} 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 (z <= (-5.5d-47)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 7.5d+16) then
tmp = x - ((y * t) / (z - a))
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 (z <= -5.5e-47) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 7.5e+16) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e-47: tmp = x + (y * (1.0 - (t / z))) elif z <= 7.5e+16: tmp = x - ((y * t) / (z - a)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e-47) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 7.5e+16) tmp = Float64(x - Float64(Float64(y * t) / Float64(z - a))); 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 (z <= -5.5e-47) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 7.5e+16) tmp = x - ((y * t) / (z - a)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e-47], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+16], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -5.5000000000000002e-47Initial program 99.9%
Taylor expanded in a around 0 82.8%
div-sub82.8%
*-inverses82.8%
Simplified82.8%
if -5.5000000000000002e-47 < z < 7.5e16Initial program 95.1%
Taylor expanded in t around inf 90.4%
neg-mul-190.4%
distribute-neg-frac90.4%
Simplified90.4%
Taylor expanded in x around 0 88.9%
+-commutative88.9%
mul-1-neg88.9%
associate-*r/90.4%
sub-neg90.4%
associate-*r/88.9%
Simplified88.9%
if 7.5e16 < z Initial program 100.0%
Taylor expanded in t around 0 89.5%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e+45) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 9.8e+16) (- x (* y (/ t (- z a)))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+45) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 9.8e+16) {
tmp = x - (y * (t / (z - a)));
} 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 (z <= (-1.35d+45)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 9.8d+16) then
tmp = x - (y * (t / (z - a)))
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 (z <= -1.35e+45) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 9.8e+16) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+45: tmp = x + (y * (1.0 - (t / z))) elif z <= 9.8e+16: tmp = x - (y * (t / (z - a))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+45) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 9.8e+16) tmp = Float64(x - Float64(y * Float64(t / Float64(z - a)))); 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 (z <= -1.35e+45) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 9.8e+16) tmp = x - (y * (t / (z - a))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+45], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+16], N[(x - N[(y * N[(t / N[(z - a), $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}\;z \leq -1.35 \cdot 10^{+45}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+16}:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.34999999999999992e45Initial program 99.9%
Taylor expanded in a around 0 87.7%
div-sub87.7%
*-inverses87.7%
Simplified87.7%
if -1.34999999999999992e45 < z < 9.8e16Initial program 95.8%
Taylor expanded in t around inf 88.5%
neg-mul-188.5%
distribute-neg-frac88.5%
Simplified88.5%
if 9.8e16 < z Initial program 100.0%
Taylor expanded in t around 0 89.5%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e+39) (not (<= z 3.2e+16))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+39) || !(z <= 3.2e+16)) {
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 <= (-2d+39)) .or. (.not. (z <= 3.2d+16))) 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 <= -2e+39) || !(z <= 3.2e+16)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e+39) or not (z <= 3.2e+16): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e+39) || !(z <= 3.2e+16)) tmp = Float64(y + x); 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 <= -2e+39) || ~((z <= 3.2e+16))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+39], N[Not[LessEqual[z, 3.2e+16]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+39} \lor \neg \left(z \leq 3.2 \cdot 10^{+16}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.99999999999999988e39 or 3.2e16 < z Initial program 99.9%
Taylor expanded in z around inf 77.9%
if -1.99999999999999988e39 < z < 3.2e16Initial program 95.8%
Taylor expanded in z around 0 74.3%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e+42) (+ y x) (if (<= z 5.5e+16) (+ x (/ y (/ a t))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+42) {
tmp = y + x;
} else if (z <= 5.5e+16) {
tmp = x + (y / (a / t));
} 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.6d+42)) then
tmp = y + x
else if (z <= 5.5d+16) then
tmp = x + (y / (a / t))
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.6e+42) {
tmp = y + x;
} else if (z <= 5.5e+16) {
tmp = x + (y / (a / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.6e+42: tmp = y + x elif z <= 5.5e+16: tmp = x + (y / (a / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+42) tmp = Float64(y + x); elseif (z <= 5.5e+16) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.6e+42) tmp = y + x; elseif (z <= 5.5e+16) tmp = x + (y / (a / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+42], N[(y + x), $MachinePrecision], If[LessEqual[z, 5.5e+16], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+42}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.60000000000000001e42 or 5.5e16 < z Initial program 99.9%
Taylor expanded in z around inf 77.9%
if -1.60000000000000001e42 < z < 5.5e16Initial program 95.8%
Taylor expanded in z around 0 70.3%
associate-/l*74.8%
Simplified74.8%
Final simplification76.2%
(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}
Initial program 97.6%
Final simplification97.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.45e+216) (not (<= t 7e+200))) (* y (/ t a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.45e+216) || !(t <= 7e+200)) {
tmp = y * (t / a);
} 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 ((t <= (-2.45d+216)) .or. (.not. (t <= 7d+200))) then
tmp = y * (t / a)
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 ((t <= -2.45e+216) || !(t <= 7e+200)) {
tmp = y * (t / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.45e+216) or not (t <= 7e+200): tmp = y * (t / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.45e+216) || !(t <= 7e+200)) tmp = Float64(y * Float64(t / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.45e+216) || ~((t <= 7e+200))) tmp = y * (t / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.45e+216], N[Not[LessEqual[t, 7e+200]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{+216} \lor \neg \left(t \leq 7 \cdot 10^{+200}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.45000000000000007e216 or 7.00000000000000013e200 < t Initial program 91.2%
Taylor expanded in x around 0 60.9%
Taylor expanded in z around 0 47.5%
associate-/l*56.1%
Simplified56.1%
clear-num56.0%
inv-pow56.0%
Applied egg-rr56.0%
unpow-156.0%
associate-/l/47.6%
Simplified47.6%
Taylor expanded in a around 0 47.5%
associate-*r/56.1%
Simplified56.1%
if -2.45000000000000007e216 < t < 7.00000000000000013e200Initial program 99.0%
Taylor expanded in z around inf 62.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.4e+215) (/ y (/ a t)) (if (<= t 1.38e+200) (+ y x) (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.4e+215) {
tmp = y / (a / t);
} else if (t <= 1.38e+200) {
tmp = y + x;
} else {
tmp = 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 (t <= (-6.4d+215)) then
tmp = y / (a / t)
else if (t <= 1.38d+200) then
tmp = y + x
else
tmp = 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 (t <= -6.4e+215) {
tmp = y / (a / t);
} else if (t <= 1.38e+200) {
tmp = y + x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.4e+215: tmp = y / (a / t) elif t <= 1.38e+200: tmp = y + x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.4e+215) tmp = Float64(y / Float64(a / t)); elseif (t <= 1.38e+200) tmp = Float64(y + x); else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.4e+215) tmp = y / (a / t); elseif (t <= 1.38e+200) tmp = y + x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.4e+215], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.38e+200], N[(y + x), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+215}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.38 \cdot 10^{+200}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if t < -6.3999999999999997e215Initial program 85.7%
Taylor expanded in x around 0 61.2%
Taylor expanded in z around 0 42.5%
associate-/l*52.9%
Simplified52.9%
if -6.3999999999999997e215 < t < 1.38000000000000005e200Initial program 99.0%
Taylor expanded in z around inf 62.0%
if 1.38000000000000005e200 < t Initial program 99.9%
Taylor expanded in x around 0 60.2%
Taylor expanded in z around 0 55.6%
associate-/l*61.1%
Simplified61.1%
clear-num61.0%
inv-pow61.0%
Applied egg-rr61.0%
unpow-161.0%
associate-/l/55.5%
Simplified55.5%
Taylor expanded in a around 0 55.6%
associate-*r/61.2%
Simplified61.2%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.15e+193) (* t (/ (- y) z)) (if (<= t 1.45e+201) (+ y x) (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.15e+193) {
tmp = t * (-y / z);
} else if (t <= 1.45e+201) {
tmp = y + x;
} else {
tmp = 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 (t <= (-1.15d+193)) then
tmp = t * (-y / z)
else if (t <= 1.45d+201) then
tmp = y + x
else
tmp = 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 (t <= -1.15e+193) {
tmp = t * (-y / z);
} else if (t <= 1.45e+201) {
tmp = y + x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.15e+193: tmp = t * (-y / z) elif t <= 1.45e+201: tmp = y + x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.15e+193) tmp = Float64(t * Float64(Float64(-y) / z)); elseif (t <= 1.45e+201) tmp = Float64(y + x); else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.15e+193) tmp = t * (-y / z); elseif (t <= 1.45e+201) tmp = y + x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.15e+193], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+201], N[(y + x), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+193}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+201}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if t < -1.15000000000000007e193Initial program 88.6%
+-commutative88.6%
associate-*r/75.3%
associate-*l/91.5%
*-commutative91.5%
fma-def91.5%
Simplified91.5%
clear-num91.3%
associate-/r/91.4%
Applied egg-rr91.4%
Taylor expanded in t around inf 53.0%
associate-*r/53.0%
mul-1-neg53.0%
distribute-rgt-neg-in53.0%
Simplified53.0%
Taylor expanded in z around inf 36.0%
associate-*r/36.0%
associate-*r*36.0%
neg-mul-136.0%
Simplified36.0%
Taylor expanded in y around 0 36.0%
mul-1-neg36.0%
associate-*l/49.4%
distribute-rgt-neg-in49.4%
Simplified49.4%
if -1.15000000000000007e193 < t < 1.4500000000000001e201Initial program 99.0%
Taylor expanded in z around inf 63.0%
if 1.4500000000000001e201 < t Initial program 99.9%
Taylor expanded in x around 0 60.2%
Taylor expanded in z around 0 55.6%
associate-/l*61.1%
Simplified61.1%
clear-num61.0%
inv-pow61.0%
Applied egg-rr61.0%
unpow-161.0%
associate-/l/55.5%
Simplified55.5%
Taylor expanded in a around 0 55.6%
associate-*r/61.2%
Simplified61.2%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (+ y x))
double code(double x, double y, double z, double t, double a) {
return y + 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 = y + x
end function
public static double code(double x, double y, double z, double t, double a) {
return y + x;
}
def code(x, y, z, t, a): return y + x
function code(x, y, z, t, a) return Float64(y + x) end
function tmp = code(x, y, z, t, a) tmp = y + x; end
code[x_, y_, z_, t_, a_] := N[(y + x), $MachinePrecision]
\begin{array}{l}
\\
y + x
\end{array}
Initial program 97.6%
Taylor expanded in z around inf 56.0%
Final simplification56.0%
(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.6%
Taylor expanded in x around inf 47.1%
Final simplification47.1%
(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 2023192
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))