
(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 13 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 (+ 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 98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= a -7.8e-36)
t_1
(if (<= a 2.7e-108)
(+ x (/ y (/ z (- z t))))
(if (<= a 3.2e-49)
(+ x (/ y (/ a t)))
(if (<= a 8.8e-10) (+ x (* y (- 1.0 (/ t z)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (a <= -7.8e-36) {
tmp = t_1;
} else if (a <= 2.7e-108) {
tmp = x + (y / (z / (z - t)));
} else if (a <= 3.2e-49) {
tmp = x + (y / (a / t));
} else if (a <= 8.8e-10) {
tmp = x + (y * (1.0 - (t / z)));
} 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 + (t * (y / a))
if (a <= (-7.8d-36)) then
tmp = t_1
else if (a <= 2.7d-108) then
tmp = x + (y / (z / (z - t)))
else if (a <= 3.2d-49) then
tmp = x + (y / (a / t))
else if (a <= 8.8d-10) then
tmp = x + (y * (1.0d0 - (t / z)))
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 + (t * (y / a));
double tmp;
if (a <= -7.8e-36) {
tmp = t_1;
} else if (a <= 2.7e-108) {
tmp = x + (y / (z / (z - t)));
} else if (a <= 3.2e-49) {
tmp = x + (y / (a / t));
} else if (a <= 8.8e-10) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if a <= -7.8e-36: tmp = t_1 elif a <= 2.7e-108: tmp = x + (y / (z / (z - t))) elif a <= 3.2e-49: tmp = x + (y / (a / t)) elif a <= 8.8e-10: tmp = x + (y * (1.0 - (t / z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -7.8e-36) tmp = t_1; elseif (a <= 2.7e-108) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (a <= 3.2e-49) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (a <= 8.8e-10) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (a <= -7.8e-36) tmp = t_1; elseif (a <= 2.7e-108) tmp = x + (y / (z / (z - t))); elseif (a <= 3.2e-49) tmp = x + (y / (a / t)); elseif (a <= 8.8e-10) tmp = x + (y * (1.0 - (t / z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e-36], t$95$1, If[LessEqual[a, 2.7e-108], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e-49], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.8e-10], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -7.8 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-108}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-10}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.8000000000000001e-36 or 8.7999999999999996e-10 < a Initial program 99.1%
Taylor expanded in z around 0 69.1%
+-commutative69.1%
associate-/l*78.9%
Simplified78.9%
if -7.8000000000000001e-36 < a < 2.70000000000000005e-108Initial program 96.4%
clear-num96.4%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in a around 0 90.1%
if 2.70000000000000005e-108 < a < 3.20000000000000002e-49Initial program 99.8%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 80.6%
if 3.20000000000000002e-49 < a < 8.7999999999999996e-10Initial program 100.0%
Taylor expanded in a around 0 69.3%
associate-/l*90.8%
div-sub90.8%
*-inverses90.8%
Simplified90.8%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= a -8.4e-45)
t_1
(if (<= a 2.7e-108)
(- x (* y (/ (- t z) z)))
(if (<= a 3e-47)
(+ x (/ y (/ a t)))
(if (<= a 7.6e-11) (+ x (* y (- 1.0 (/ t z)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (a <= -8.4e-45) {
tmp = t_1;
} else if (a <= 2.7e-108) {
tmp = x - (y * ((t - z) / z));
} else if (a <= 3e-47) {
tmp = x + (y / (a / t));
} else if (a <= 7.6e-11) {
tmp = x + (y * (1.0 - (t / z)));
} 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 + (t * (y / a))
if (a <= (-8.4d-45)) then
tmp = t_1
else if (a <= 2.7d-108) then
tmp = x - (y * ((t - z) / z))
else if (a <= 3d-47) then
tmp = x + (y / (a / t))
else if (a <= 7.6d-11) then
tmp = x + (y * (1.0d0 - (t / z)))
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 + (t * (y / a));
double tmp;
if (a <= -8.4e-45) {
tmp = t_1;
} else if (a <= 2.7e-108) {
tmp = x - (y * ((t - z) / z));
} else if (a <= 3e-47) {
tmp = x + (y / (a / t));
} else if (a <= 7.6e-11) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if a <= -8.4e-45: tmp = t_1 elif a <= 2.7e-108: tmp = x - (y * ((t - z) / z)) elif a <= 3e-47: tmp = x + (y / (a / t)) elif a <= 7.6e-11: tmp = x + (y * (1.0 - (t / z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -8.4e-45) tmp = t_1; elseif (a <= 2.7e-108) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); elseif (a <= 3e-47) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (a <= 7.6e-11) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (a <= -8.4e-45) tmp = t_1; elseif (a <= 2.7e-108) tmp = x - (y * ((t - z) / z)); elseif (a <= 3e-47) tmp = x + (y / (a / t)); elseif (a <= 7.6e-11) tmp = x + (y * (1.0 - (t / z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.4e-45], t$95$1, If[LessEqual[a, 2.7e-108], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-47], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e-11], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -8.4 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-108}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-11}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.3999999999999998e-45 or 7.5999999999999996e-11 < a Initial program 99.1%
Taylor expanded in z around 0 69.1%
+-commutative69.1%
associate-/l*78.9%
Simplified78.9%
if -8.3999999999999998e-45 < a < 2.70000000000000005e-108Initial program 96.4%
Taylor expanded in a around 0 90.1%
if 2.70000000000000005e-108 < a < 3.00000000000000017e-47Initial program 99.8%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 80.6%
if 3.00000000000000017e-47 < a < 7.5999999999999996e-11Initial program 100.0%
Taylor expanded in a around 0 69.3%
associate-/l*90.8%
div-sub90.8%
*-inverses90.8%
Simplified90.8%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))) (t_2 (+ x (* t (/ y a)))))
(if (<= a -1.05e-33)
t_2
(if (<= a 2.7e-109)
t_1
(if (<= a 2.2e-49) (+ x (/ y (/ a t))) (if (<= a 1.72e-9) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -1.05e-33) {
tmp = t_2;
} else if (a <= 2.7e-109) {
tmp = t_1;
} else if (a <= 2.2e-49) {
tmp = x + (y / (a / t));
} else if (a <= 1.72e-9) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
t_2 = x + (t * (y / a))
if (a <= (-1.05d-33)) then
tmp = t_2
else if (a <= 2.7d-109) then
tmp = t_1
else if (a <= 2.2d-49) then
tmp = x + (y / (a / t))
else if (a <= 1.72d-9) then
tmp = t_1
else
tmp = t_2
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 t_2 = x + (t * (y / a));
double tmp;
if (a <= -1.05e-33) {
tmp = t_2;
} else if (a <= 2.7e-109) {
tmp = t_1;
} else if (a <= 2.2e-49) {
tmp = x + (y / (a / t));
} else if (a <= 1.72e-9) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) t_2 = x + (t * (y / a)) tmp = 0 if a <= -1.05e-33: tmp = t_2 elif a <= 2.7e-109: tmp = t_1 elif a <= 2.2e-49: tmp = x + (y / (a / t)) elif a <= 1.72e-9: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -1.05e-33) tmp = t_2; elseif (a <= 2.7e-109) tmp = t_1; elseif (a <= 2.2e-49) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (a <= 1.72e-9) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); t_2 = x + (t * (y / a)); tmp = 0.0; if (a <= -1.05e-33) tmp = t_2; elseif (a <= 2.7e-109) tmp = t_1; elseif (a <= 2.2e-49) tmp = x + (y / (a / t)); elseif (a <= 1.72e-9) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.05e-33], t$95$2, If[LessEqual[a, 2.7e-109], t$95$1, If[LessEqual[a, 2.2e-49], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.72e-9], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;a \leq 1.72 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.05e-33 or 1.72000000000000006e-9 < a Initial program 99.1%
Taylor expanded in z around 0 69.1%
+-commutative69.1%
associate-/l*78.9%
Simplified78.9%
if -1.05e-33 < a < 2.7e-109 or 2.1999999999999999e-49 < a < 1.72000000000000006e-9Initial program 96.7%
Taylor expanded in a around 0 78.5%
associate-/l*90.2%
div-sub90.2%
*-inverses90.2%
Simplified90.2%
if 2.7e-109 < a < 2.1999999999999999e-49Initial program 99.8%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 80.6%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.3e+53)
(+ x y)
(if (<= z 1650.0)
(+ x (* t (/ y a)))
(if (<= z 7.5e+64)
(- x (* y (/ t z)))
(if (<= z 8.5e+76) (+ x (* y (/ t a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.3e+53) {
tmp = x + y;
} else if (z <= 1650.0) {
tmp = x + (t * (y / a));
} else if (z <= 7.5e+64) {
tmp = x - (y * (t / z));
} else if (z <= 8.5e+76) {
tmp = x + (y * (t / 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 (z <= (-6.3d+53)) then
tmp = x + y
else if (z <= 1650.0d0) then
tmp = x + (t * (y / a))
else if (z <= 7.5d+64) then
tmp = x - (y * (t / z))
else if (z <= 8.5d+76) then
tmp = x + (y * (t / 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 (z <= -6.3e+53) {
tmp = x + y;
} else if (z <= 1650.0) {
tmp = x + (t * (y / a));
} else if (z <= 7.5e+64) {
tmp = x - (y * (t / z));
} else if (z <= 8.5e+76) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.3e+53: tmp = x + y elif z <= 1650.0: tmp = x + (t * (y / a)) elif z <= 7.5e+64: tmp = x - (y * (t / z)) elif z <= 8.5e+76: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.3e+53) tmp = Float64(x + y); elseif (z <= 1650.0) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 7.5e+64) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 8.5e+76) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.3e+53) tmp = x + y; elseif (z <= 1650.0) tmp = x + (t * (y / a)); elseif (z <= 7.5e+64) tmp = x - (y * (t / z)); elseif (z <= 8.5e+76) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.3e+53], N[(x + y), $MachinePrecision], If[LessEqual[z, 1650.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+64], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+76], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+53}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1650:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+64}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+76}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.29999999999999974e53 or 8.49999999999999992e76 < z Initial program 99.9%
Taylor expanded in z around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -6.29999999999999974e53 < z < 1650Initial program 96.5%
Taylor expanded in z around 0 71.6%
+-commutative71.6%
associate-/l*75.9%
Simplified75.9%
if 1650 < z < 7.5000000000000005e64Initial program 99.9%
associate-*r/93.7%
Simplified93.7%
Taylor expanded in z around 0 74.7%
mul-1-neg74.7%
distribute-lft-neg-out74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in x around 0 74.7%
associate-*l/75.8%
*-commutative75.8%
neg-mul-175.8%
sub-neg75.8%
Simplified75.8%
Taylor expanded in z around inf 62.9%
if 7.5000000000000005e64 < z < 8.49999999999999992e76Initial program 100.0%
Taylor expanded in z around 0 37.4%
*-commutative37.4%
associate-/l*100.0%
Simplified100.0%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.46e+54)
(+ x y)
(if (<= z 620.0)
(+ x (* t (/ y a)))
(if (<= z 8e+63)
(- x (* t (/ y z)))
(if (<= z 3.8e+77) (+ x (* y (/ t a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.46e+54) {
tmp = x + y;
} else if (z <= 620.0) {
tmp = x + (t * (y / a));
} else if (z <= 8e+63) {
tmp = x - (t * (y / z));
} else if (z <= 3.8e+77) {
tmp = x + (y * (t / 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 (z <= (-1.46d+54)) then
tmp = x + y
else if (z <= 620.0d0) then
tmp = x + (t * (y / a))
else if (z <= 8d+63) then
tmp = x - (t * (y / z))
else if (z <= 3.8d+77) then
tmp = x + (y * (t / 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 (z <= -1.46e+54) {
tmp = x + y;
} else if (z <= 620.0) {
tmp = x + (t * (y / a));
} else if (z <= 8e+63) {
tmp = x - (t * (y / z));
} else if (z <= 3.8e+77) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.46e+54: tmp = x + y elif z <= 620.0: tmp = x + (t * (y / a)) elif z <= 8e+63: tmp = x - (t * (y / z)) elif z <= 3.8e+77: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.46e+54) tmp = Float64(x + y); elseif (z <= 620.0) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 8e+63) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 3.8e+77) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.46e+54) tmp = x + y; elseif (z <= 620.0) tmp = x + (t * (y / a)); elseif (z <= 8e+63) tmp = x - (t * (y / z)); elseif (z <= 3.8e+77) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.46e+54], N[(x + y), $MachinePrecision], If[LessEqual[z, 620.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+63], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+77], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.46 \cdot 10^{+54}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 620:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+63}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.46000000000000003e54 or 3.8000000000000001e77 < z Initial program 99.9%
Taylor expanded in z around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -1.46000000000000003e54 < z < 620Initial program 96.5%
Taylor expanded in z around 0 71.6%
+-commutative71.6%
associate-/l*75.9%
Simplified75.9%
if 620 < z < 8.00000000000000046e63Initial program 99.9%
associate-*r/93.7%
Simplified93.7%
Taylor expanded in z around 0 74.7%
mul-1-neg74.7%
distribute-lft-neg-out74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in z around inf 61.9%
mul-1-neg61.9%
unsub-neg61.9%
associate-/l*62.8%
Simplified62.8%
if 8.00000000000000046e63 < z < 3.8000000000000001e77Initial program 100.0%
Taylor expanded in z around 0 37.4%
*-commutative37.4%
associate-/l*100.0%
Simplified100.0%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.7) (not (<= t 3.8e+20))) (+ 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 <= -4.7) || !(t <= 3.8e+20)) {
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 <= (-4.7d0)) .or. (.not. (t <= 3.8d+20))) 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 <= -4.7) || !(t <= 3.8e+20)) {
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 <= -4.7) or not (t <= 3.8e+20): 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 <= -4.7) || !(t <= 3.8e+20)) 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 <= -4.7) || ~((t <= 3.8e+20))) 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, -4.7], N[Not[LessEqual[t, 3.8e+20]], $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 -4.7 \lor \neg \left(t \leq 3.8 \cdot 10^{+20}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -4.70000000000000018 or 3.8e20 < t Initial program 96.2%
Taylor expanded in t around inf 77.3%
mul-1-neg77.3%
associate-/l*91.3%
Simplified91.3%
if -4.70000000000000018 < t < 3.8e20Initial program 99.9%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-/l*91.2%
Simplified91.2%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.6) (not (<= t 2100000000000.0))) (+ 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 <= -9.6) || !(t <= 2100000000000.0)) {
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 <= (-9.6d0)) .or. (.not. (t <= 2100000000000.0d0))) 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 <= -9.6) || !(t <= 2100000000000.0)) {
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 <= -9.6) or not (t <= 2100000000000.0): 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 <= -9.6) || !(t <= 2100000000000.0)) 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 <= -9.6) || ~((t <= 2100000000000.0))) 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, -9.6], N[Not[LessEqual[t, 2100000000000.0]], $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 -9.6 \lor \neg \left(t \leq 2100000000000\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -9.59999999999999964 or 2.1e12 < t Initial program 96.2%
associate-*r/81.5%
Simplified81.5%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
distribute-lft-neg-out77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in x around 0 77.3%
associate-*l/88.0%
*-commutative88.0%
neg-mul-188.0%
sub-neg88.0%
Simplified88.0%
if -9.59999999999999964 < t < 2.1e12Initial program 99.9%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-/l*91.2%
Simplified91.2%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e+95) (+ x (* t (/ y a))) (if (<= t 1.4e+117) (+ x (* y (/ z (- z a)))) (+ x (/ y (/ z (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e+95) {
tmp = x + (t * (y / a));
} else if (t <= 1.4e+117) {
tmp = x + (y * (z / (z - a)));
} 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 (t <= (-3.6d+95)) then
tmp = x + (t * (y / a))
else if (t <= 1.4d+117) then
tmp = x + (y * (z / (z - a)))
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 (t <= -3.6e+95) {
tmp = x + (t * (y / a));
} else if (t <= 1.4e+117) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e+95: tmp = x + (t * (y / a)) elif t <= 1.4e+117: tmp = x + (y * (z / (z - a))) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e+95) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (t <= 1.4e+117) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); 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 (t <= -3.6e+95) tmp = x + (t * (y / a)); elseif (t <= 1.4e+117) tmp = x + (y * (z / (z - a))); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e+95], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+117], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+95}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+117}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if t < -3.59999999999999978e95Initial program 93.7%
Taylor expanded in z around 0 56.2%
+-commutative56.2%
associate-/l*72.4%
Simplified72.4%
if -3.59999999999999978e95 < t < 1.39999999999999999e117Initial program 99.3%
Taylor expanded in t around 0 78.5%
+-commutative78.5%
associate-/l*88.7%
Simplified88.7%
if 1.39999999999999999e117 < t Initial program 97.6%
clear-num97.5%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in a around 0 68.7%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+56) (not (<= z 1.2e+77))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+56) || !(z <= 1.2e+77)) {
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 <= (-8d+56)) .or. (.not. (z <= 1.2d+77))) 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 <= -8e+56) || !(z <= 1.2e+77)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e+56) or not (z <= 1.2e+77): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+56) || !(z <= 1.2e+77)) 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 <= -8e+56) || ~((z <= 1.2e+77))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+56], N[Not[LessEqual[z, 1.2e+77]], $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 -8 \cdot 10^{+56} \lor \neg \left(z \leq 1.2 \cdot 10^{+77}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.00000000000000074e56 or 1.1999999999999999e77 < z Initial program 99.9%
Taylor expanded in z around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -8.00000000000000074e56 < z < 1.1999999999999999e77Initial program 96.9%
Taylor expanded in z around 0 67.5%
+-commutative67.5%
associate-/l*72.5%
Simplified72.5%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.5e+55) (not (<= z 1.1e+77))) (+ x y) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+55) || !(z <= 1.1e+77)) {
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 <= (-8.5d+55)) .or. (.not. (z <= 1.1d+77))) 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 <= -8.5e+55) || !(z <= 1.1e+77)) {
tmp = x + y;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e+55) or not (z <= 1.1e+77): tmp = x + y else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e+55) || !(z <= 1.1e+77)) 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 <= -8.5e+55) || ~((z <= 1.1e+77))) tmp = x + y; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+55], N[Not[LessEqual[z, 1.1e+77]], $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 -8.5 \cdot 10^{+55} \lor \neg \left(z \leq 1.1 \cdot 10^{+77}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -8.50000000000000002e55 or 1.1e77 < z Initial program 99.9%
Taylor expanded in z around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -8.50000000000000002e55 < z < 1.1e77Initial program 96.9%
Taylor expanded in z around 0 67.5%
*-commutative67.5%
associate-/l*71.9%
Simplified71.9%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e-36) (not (<= z 3.2e-9))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e-36) || !(z <= 3.2e-9)) {
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 ((z <= (-5.2d-36)) .or. (.not. (z <= 3.2d-9))) 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 ((z <= -5.2e-36) || !(z <= 3.2e-9)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e-36) or not (z <= 3.2e-9): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e-36) || !(z <= 3.2e-9)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.2e-36) || ~((z <= 3.2e-9))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e-36], N[Not[LessEqual[z, 3.2e-9]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-36} \lor \neg \left(z \leq 3.2 \cdot 10^{-9}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.2000000000000001e-36 or 3.20000000000000012e-9 < z Initial program 99.9%
Taylor expanded in z around inf 69.0%
+-commutative69.0%
Simplified69.0%
if -5.2000000000000001e-36 < z < 3.20000000000000012e-9Initial program 95.7%
Taylor expanded in x around inf 52.7%
Final simplification61.8%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.1%
Taylor expanded in x around inf 49.4%
(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 2024085
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))