
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+222)))
(+ x (/ (- z t) (/ (- z a) y)))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+222)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+222)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+222): tmp = x + ((z - t) / ((z - a) / y)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+222)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+222))) tmp = x + ((z - t) / ((z - a) / y)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+222]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+222}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1e222 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 41.3%
clear-num41.3%
inv-pow41.3%
Applied egg-rr41.3%
unpow-141.3%
associate-/r*99.7%
Simplified99.7%
clear-num99.8%
add-cube-cbrt98.9%
associate-/l*98.8%
pow298.8%
Applied egg-rr98.8%
associate-*r/98.9%
unpow298.9%
rem-3cbrt-lft99.8%
Simplified99.8%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1e222Initial program 99.5%
Final simplification99.6%
(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 86.6%
+-commutative86.6%
associate-/l*98.8%
fma-define98.8%
Simplified98.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+222)))
(+ x (* y (/ (- z t) z)))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+222)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+222)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+222): tmp = x + (y * ((z - t) / z)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+222)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+222))) tmp = x + (y * ((z - t) / z)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+222]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+222}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1e222 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 41.3%
Taylor expanded in a around 0 37.4%
+-commutative37.4%
associate-/l*79.8%
Simplified79.8%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1e222Initial program 99.5%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) z))))
(if (<= y -1.65e+127)
t_1
(if (<= y 1.55e+171)
(+ y x)
(if (<= y 5.1e+230)
(* y (/ t a))
(if (<= y 1.22e+288) (* y (/ z (- z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / z);
double tmp;
if (y <= -1.65e+127) {
tmp = t_1;
} else if (y <= 1.55e+171) {
tmp = y + x;
} else if (y <= 5.1e+230) {
tmp = y * (t / a);
} else if (y <= 1.22e+288) {
tmp = y * (z / (z - a));
} 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 = y * ((z - t) / z)
if (y <= (-1.65d+127)) then
tmp = t_1
else if (y <= 1.55d+171) then
tmp = y + x
else if (y <= 5.1d+230) then
tmp = y * (t / a)
else if (y <= 1.22d+288) then
tmp = y * (z / (z - a))
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 = y * ((z - t) / z);
double tmp;
if (y <= -1.65e+127) {
tmp = t_1;
} else if (y <= 1.55e+171) {
tmp = y + x;
} else if (y <= 5.1e+230) {
tmp = y * (t / a);
} else if (y <= 1.22e+288) {
tmp = y * (z / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / z) tmp = 0 if y <= -1.65e+127: tmp = t_1 elif y <= 1.55e+171: tmp = y + x elif y <= 5.1e+230: tmp = y * (t / a) elif y <= 1.22e+288: tmp = y * (z / (z - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / z)) tmp = 0.0 if (y <= -1.65e+127) tmp = t_1; elseif (y <= 1.55e+171) tmp = Float64(y + x); elseif (y <= 5.1e+230) tmp = Float64(y * Float64(t / a)); elseif (y <= 1.22e+288) tmp = Float64(y * Float64(z / Float64(z - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / z); tmp = 0.0; if (y <= -1.65e+127) tmp = t_1; elseif (y <= 1.55e+171) tmp = y + x; elseif (y <= 5.1e+230) tmp = y * (t / a); elseif (y <= 1.22e+288) tmp = y * (z / (z - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+127], t$95$1, If[LessEqual[y, 1.55e+171], N[(y + x), $MachinePrecision], If[LessEqual[y, 5.1e+230], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e+288], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+171}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+288}:\\
\;\;\;\;y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.64999999999999988e127 or 1.22000000000000011e288 < y Initial program 64.4%
Taylor expanded in x around 0 56.9%
Taylor expanded in a around 0 36.1%
associate-/l*54.8%
Simplified54.8%
if -1.64999999999999988e127 < y < 1.5499999999999999e171Initial program 96.3%
Taylor expanded in z around inf 73.6%
+-commutative73.6%
Simplified73.6%
if 1.5499999999999999e171 < y < 5.1e230Initial program 72.9%
Taylor expanded in x around 0 60.0%
Taylor expanded in z around 0 52.9%
neg-mul-152.9%
Simplified52.9%
Taylor expanded in z around 0 52.4%
*-commutative52.4%
associate-/l*65.5%
Simplified65.5%
if 5.1e230 < y < 1.22000000000000011e288Initial program 53.5%
Taylor expanded in x around 0 53.5%
Taylor expanded in t around 0 38.3%
associate-/l*72.6%
Simplified72.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- z a)))))
(if (<= y -1.4e+168)
t_1
(if (<= y -6.2e+124)
(* t (/ y a))
(if (<= y 1.55e+171) (+ y x) (if (<= y 9.2e+230) (* y (/ t a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (z - a));
double tmp;
if (y <= -1.4e+168) {
tmp = t_1;
} else if (y <= -6.2e+124) {
tmp = t * (y / a);
} else if (y <= 1.55e+171) {
tmp = y + x;
} else if (y <= 9.2e+230) {
tmp = y * (t / a);
} 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 = y * (z / (z - a))
if (y <= (-1.4d+168)) then
tmp = t_1
else if (y <= (-6.2d+124)) then
tmp = t * (y / a)
else if (y <= 1.55d+171) then
tmp = y + x
else if (y <= 9.2d+230) then
tmp = y * (t / a)
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 = y * (z / (z - a));
double tmp;
if (y <= -1.4e+168) {
tmp = t_1;
} else if (y <= -6.2e+124) {
tmp = t * (y / a);
} else if (y <= 1.55e+171) {
tmp = y + x;
} else if (y <= 9.2e+230) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (z - a)) tmp = 0 if y <= -1.4e+168: tmp = t_1 elif y <= -6.2e+124: tmp = t * (y / a) elif y <= 1.55e+171: tmp = y + x elif y <= 9.2e+230: tmp = y * (t / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(z - a))) tmp = 0.0 if (y <= -1.4e+168) tmp = t_1; elseif (y <= -6.2e+124) tmp = Float64(t * Float64(y / a)); elseif (y <= 1.55e+171) tmp = Float64(y + x); elseif (y <= 9.2e+230) tmp = Float64(y * Float64(t / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (z - a)); tmp = 0.0; if (y <= -1.4e+168) tmp = t_1; elseif (y <= -6.2e+124) tmp = t * (y / a); elseif (y <= 1.55e+171) tmp = y + x; elseif (y <= 9.2e+230) tmp = y * (t / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+168], t$95$1, If[LessEqual[y, -6.2e+124], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+171], N[(y + x), $MachinePrecision], If[LessEqual[y, 9.2e+230], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{z - a}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+124}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+171}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.39999999999999995e168 or 9.1999999999999993e230 < y Initial program 60.2%
Taylor expanded in x around 0 54.5%
Taylor expanded in t around 0 30.7%
associate-/l*55.1%
Simplified55.1%
if -1.39999999999999995e168 < y < -6.2000000000000004e124Initial program 70.7%
Taylor expanded in x around 0 63.2%
Taylor expanded in z around 0 51.9%
associate-/l*59.0%
Simplified59.0%
if -6.2000000000000004e124 < y < 1.5499999999999999e171Initial program 96.3%
Taylor expanded in z around inf 73.6%
+-commutative73.6%
Simplified73.6%
if 1.5499999999999999e171 < y < 9.1999999999999993e230Initial program 72.9%
Taylor expanded in x around 0 60.0%
Taylor expanded in z around 0 52.9%
neg-mul-152.9%
Simplified52.9%
Taylor expanded in z around 0 52.4%
*-commutative52.4%
associate-/l*65.5%
Simplified65.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.5e+242) x (if (or (<= a -1.8e-288) (not (<= a 3.5e-245))) (+ y x) (/ (- (* y t)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e+242) {
tmp = x;
} else if ((a <= -1.8e-288) || !(a <= 3.5e-245)) {
tmp = y + x;
} else {
tmp = -(y * t) / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.5d+242)) then
tmp = x
else if ((a <= (-1.8d-288)) .or. (.not. (a <= 3.5d-245))) then
tmp = y + x
else
tmp = -(y * t) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e+242) {
tmp = x;
} else if ((a <= -1.8e-288) || !(a <= 3.5e-245)) {
tmp = y + x;
} else {
tmp = -(y * t) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e+242: tmp = x elif (a <= -1.8e-288) or not (a <= 3.5e-245): tmp = y + x else: tmp = -(y * t) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.5e+242) tmp = x; elseif ((a <= -1.8e-288) || !(a <= 3.5e-245)) tmp = Float64(y + x); else tmp = Float64(Float64(-Float64(y * t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.5e+242) tmp = x; elseif ((a <= -1.8e-288) || ~((a <= 3.5e-245))) tmp = y + x; else tmp = -(y * t) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e+242], x, If[Or[LessEqual[a, -1.8e-288], N[Not[LessEqual[a, 3.5e-245]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[((-N[(y * t), $MachinePrecision]) / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+242}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-288} \lor \neg \left(a \leq 3.5 \cdot 10^{-245}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{-y \cdot t}{z}\\
\end{array}
\end{array}
if a < -5.50000000000000022e242Initial program 86.5%
Taylor expanded in x around inf 82.8%
if -5.50000000000000022e242 < a < -1.8000000000000001e-288 or 3.50000000000000016e-245 < a Initial program 86.5%
Taylor expanded in z around inf 64.2%
+-commutative64.2%
Simplified64.2%
if -1.8000000000000001e-288 < a < 3.50000000000000016e-245Initial program 87.4%
Taylor expanded in x around 0 85.6%
Taylor expanded in a around 0 77.9%
Taylor expanded in z around 0 70.5%
associate-*r/70.5%
associate-*r*70.5%
neg-mul-170.5%
*-commutative70.5%
Simplified70.5%
Final simplification66.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.7e+242)
x
(if (or (<= a -1.18e-296) (not (<= a 2.8e-241)))
(+ y x)
(* t (/ y (- z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+242) {
tmp = x;
} else if ((a <= -1.18e-296) || !(a <= 2.8e-241)) {
tmp = y + x;
} else {
tmp = t * (y / -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d+242)) then
tmp = x
else if ((a <= (-1.18d-296)) .or. (.not. (a <= 2.8d-241))) then
tmp = y + x
else
tmp = t * (y / -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+242) {
tmp = x;
} else if ((a <= -1.18e-296) || !(a <= 2.8e-241)) {
tmp = y + x;
} else {
tmp = t * (y / -z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+242: tmp = x elif (a <= -1.18e-296) or not (a <= 2.8e-241): tmp = y + x else: tmp = t * (y / -z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+242) tmp = x; elseif ((a <= -1.18e-296) || !(a <= 2.8e-241)) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e+242) tmp = x; elseif ((a <= -1.18e-296) || ~((a <= 2.8e-241))) tmp = y + x; else tmp = t * (y / -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+242], x, If[Or[LessEqual[a, -1.18e-296], N[Not[LessEqual[a, 2.8e-241]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+242}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.18 \cdot 10^{-296} \lor \neg \left(a \leq 2.8 \cdot 10^{-241}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\end{array}
\end{array}
if a < -3.7e242Initial program 86.5%
Taylor expanded in x around inf 82.8%
if -3.7e242 < a < -1.18e-296 or 2.7999999999999999e-241 < a Initial program 86.8%
Taylor expanded in z around inf 64.4%
+-commutative64.4%
Simplified64.4%
if -1.18e-296 < a < 2.7999999999999999e-241Initial program 82.8%
Taylor expanded in x around 0 81.2%
Taylor expanded in a around 0 74.5%
Taylor expanded in z around 0 68.0%
mul-1-neg68.0%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
mul-1-neg68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.2e+26) (not (<= a 82.0))) (+ x (* y (/ (- t z) a))) (+ x (/ y (/ z (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e+26) || !(a <= 82.0)) {
tmp = x + (y * ((t - 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 ((a <= (-2.2d+26)) .or. (.not. (a <= 82.0d0))) then
tmp = x + (y * ((t - 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 ((a <= -2.2e+26) || !(a <= 82.0)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.2e+26) or not (a <= 82.0): tmp = x + (y * ((t - z) / a)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.2e+26) || !(a <= 82.0)) tmp = Float64(x + Float64(y * Float64(Float64(t - 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 ((a <= -2.2e+26) || ~((a <= 82.0))) tmp = x + (y * ((t - z) / a)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.2e+26], N[Not[LessEqual[a, 82.0]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+26} \lor \neg \left(a \leq 82\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if a < -2.20000000000000007e26 or 82 < a Initial program 86.0%
Taylor expanded in a around inf 78.6%
mul-1-neg78.6%
unsub-neg78.6%
associate-/l*86.6%
Simplified86.6%
if -2.20000000000000007e26 < a < 82Initial program 87.1%
Taylor expanded in a around 0 72.1%
+-commutative72.1%
associate-/l*85.0%
Simplified85.0%
clear-num85.0%
un-div-inv85.0%
Applied egg-rr85.0%
Final simplification85.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.25e+27) (+ x (* y (/ (- t z) a))) (if (<= a 0.28) (+ x (/ y (/ z (- z t)))) (+ x (/ (- t z) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e+27) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 0.28) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + ((t - z) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.25d+27)) then
tmp = x + (y * ((t - z) / a))
else if (a <= 0.28d0) then
tmp = x + (y / (z / (z - t)))
else
tmp = x + ((t - z) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e+27) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 0.28) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + ((t - z) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.25e+27: tmp = x + (y * ((t - z) / a)) elif a <= 0.28: tmp = x + (y / (z / (z - t))) else: tmp = x + ((t - z) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e+27) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (a <= 0.28) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.25e+27) tmp = x + (y * ((t - z) / a)); elseif (a <= 0.28) tmp = x + (y / (z / (z - t))); else tmp = x + ((t - z) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e+27], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.28], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+27}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;a \leq 0.28:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.24999999999999995e27Initial program 86.3%
Taylor expanded in a around inf 76.5%
mul-1-neg76.5%
unsub-neg76.5%
associate-/l*86.0%
Simplified86.0%
if -1.24999999999999995e27 < a < 0.28000000000000003Initial program 87.1%
Taylor expanded in a around 0 72.1%
+-commutative72.1%
associate-/l*85.0%
Simplified85.0%
clear-num85.0%
un-div-inv85.0%
Applied egg-rr85.0%
if 0.28000000000000003 < a Initial program 85.7%
clear-num85.6%
inv-pow85.6%
Applied egg-rr85.6%
unpow-185.6%
associate-/r*97.4%
Simplified97.4%
clear-num97.5%
add-cube-cbrt96.9%
associate-/l*96.9%
pow296.9%
Applied egg-rr96.9%
associate-*r/96.9%
unpow296.9%
rem-3cbrt-lft97.5%
Simplified97.5%
Taylor expanded in z around 0 88.0%
neg-mul-188.0%
distribute-neg-frac88.0%
Simplified88.0%
Final simplification86.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.8e+33) (+ x (* y (/ t a))) (if (<= a 0.062) (+ x (/ y (/ z (- z t)))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e+33) {
tmp = x + (y * (t / a));
} else if (a <= 0.062) {
tmp = x + (y / (z / (z - t)));
} 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 (a <= (-5.8d+33)) then
tmp = x + (y * (t / a))
else if (a <= 0.062d0) then
tmp = x + (y / (z / (z - t)))
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 (a <= -5.8e+33) {
tmp = x + (y * (t / a));
} else if (a <= 0.062) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.8e+33: tmp = x + (y * (t / a)) elif a <= 0.062: tmp = x + (y / (z / (z - t))) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.8e+33) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (a <= 0.062) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); 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 (a <= -5.8e+33) tmp = x + (y * (t / a)); elseif (a <= 0.062) tmp = x + (y / (z / (z - t))); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e+33], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.062], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+33}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 0.062:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -5.80000000000000049e33Initial program 86.3%
clear-num86.2%
inv-pow86.2%
Applied egg-rr86.2%
unpow-186.2%
associate-/r*92.8%
Simplified92.8%
Taylor expanded in z around 0 72.6%
*-commutative72.6%
associate-*r/78.1%
Simplified78.1%
if -5.80000000000000049e33 < a < 0.062Initial program 87.1%
Taylor expanded in a around 0 72.1%
+-commutative72.1%
associate-/l*85.0%
Simplified85.0%
clear-num85.0%
un-div-inv85.0%
Applied egg-rr85.0%
if 0.062 < a Initial program 85.7%
Taylor expanded in z around 0 77.7%
+-commutative77.7%
associate-/l*80.9%
Simplified80.9%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.55e+30) (+ x (* y (/ t a))) (if (<= a 29.0) (+ x (* y (/ (- z t) z))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.55e+30) {
tmp = x + (y * (t / a));
} else if (a <= 29.0) {
tmp = x + (y * ((z - t) / z));
} 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 (a <= (-2.55d+30)) then
tmp = x + (y * (t / a))
else if (a <= 29.0d0) then
tmp = x + (y * ((z - t) / z))
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 (a <= -2.55e+30) {
tmp = x + (y * (t / a));
} else if (a <= 29.0) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.55e+30: tmp = x + (y * (t / a)) elif a <= 29.0: tmp = x + (y * ((z - t) / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.55e+30) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (a <= 29.0) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); 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 (a <= -2.55e+30) tmp = x + (y * (t / a)); elseif (a <= 29.0) tmp = x + (y * ((z - t) / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.55e+30], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 29.0], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.55 \cdot 10^{+30}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 29:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -2.55000000000000018e30Initial program 86.3%
clear-num86.2%
inv-pow86.2%
Applied egg-rr86.2%
unpow-186.2%
associate-/r*92.8%
Simplified92.8%
Taylor expanded in z around 0 72.6%
*-commutative72.6%
associate-*r/78.1%
Simplified78.1%
if -2.55000000000000018e30 < a < 29Initial program 87.1%
Taylor expanded in a around 0 72.1%
+-commutative72.1%
associate-/l*85.0%
Simplified85.0%
if 29 < a Initial program 85.7%
Taylor expanded in z around 0 77.7%
+-commutative77.7%
associate-/l*80.9%
Simplified80.9%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.5e-94) (not (<= z 6.5e+80))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e-94) || !(z <= 6.5e+80)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7.5d-94)) .or. (.not. (z <= 6.5d+80))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e-94) || !(z <= 6.5e+80)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.5e-94) or not (z <= 6.5e+80): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.5e-94) || !(z <= 6.5e+80)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.5e-94) || ~((z <= 6.5e+80))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.5e-94], N[Not[LessEqual[z, 6.5e+80]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-94} \lor \neg \left(z \leq 6.5 \cdot 10^{+80}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -7.5000000000000003e-94 or 6.4999999999999998e80 < z Initial program 78.7%
Taylor expanded in z around inf 77.7%
+-commutative77.7%
Simplified77.7%
if -7.5000000000000003e-94 < z < 6.4999999999999998e80Initial program 94.6%
Taylor expanded in z around 0 72.3%
+-commutative72.3%
associate-/l*75.2%
Simplified75.2%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.5e-94) (not (<= z 7.5e+80))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e-94) || !(z <= 7.5e+80)) {
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 <= (-7.5d-94)) .or. (.not. (z <= 7.5d+80))) 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 <= -7.5e-94) || !(z <= 7.5e+80)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.5e-94) or not (z <= 7.5e+80): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.5e-94) || !(z <= 7.5e+80)) 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 <= -7.5e-94) || ~((z <= 7.5e+80))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.5e-94], N[Not[LessEqual[z, 7.5e+80]], $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 -7.5 \cdot 10^{-94} \lor \neg \left(z \leq 7.5 \cdot 10^{+80}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -7.5000000000000003e-94 or 7.49999999999999994e80 < z Initial program 78.7%
Taylor expanded in z around inf 77.7%
+-commutative77.7%
Simplified77.7%
if -7.5000000000000003e-94 < z < 7.49999999999999994e80Initial program 94.6%
clear-num94.6%
inv-pow94.6%
Applied egg-rr94.6%
unpow-194.6%
associate-/r*94.1%
Simplified94.1%
Taylor expanded in z around 0 72.3%
*-commutative72.3%
associate-*r/75.1%
Simplified75.1%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.6e+266) (not (<= t -6.6e+209))) (+ y x) (* y (/ t a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.6e+266) || !(t <= -6.6e+209)) {
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.6d+266)) .or. (.not. (t <= (-6.6d+209)))) 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.6e+266) || !(t <= -6.6e+209)) {
tmp = y + x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.6e+266) or not (t <= -6.6e+209): tmp = y + x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.6e+266) || !(t <= -6.6e+209)) 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.6e+266) || ~((t <= -6.6e+209))) tmp = y + x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.6e+266], N[Not[LessEqual[t, -6.6e+209]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+266} \lor \neg \left(t \leq -6.6 \cdot 10^{+209}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if t < -1.60000000000000011e266 or -6.59999999999999961e209 < t Initial program 86.2%
Taylor expanded in z around inf 63.5%
+-commutative63.5%
Simplified63.5%
if -1.60000000000000011e266 < t < -6.59999999999999961e209Initial program 93.1%
Taylor expanded in x around 0 86.0%
Taylor expanded in z around 0 72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in z around 0 72.0%
*-commutative72.0%
associate-/l*78.9%
Simplified78.9%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.55e+265) (not (<= t -3.7e+209))) (+ y x) (* t (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.55e+265) || !(t <= -3.7e+209)) {
tmp = y + x;
} else {
tmp = 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 ((t <= (-2.55d+265)) .or. (.not. (t <= (-3.7d+209)))) then
tmp = y + x
else
tmp = 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 ((t <= -2.55e+265) || !(t <= -3.7e+209)) {
tmp = y + x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.55e+265) or not (t <= -3.7e+209): tmp = y + x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.55e+265) || !(t <= -3.7e+209)) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.55e+265) || ~((t <= -3.7e+209))) tmp = y + x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.55e+265], N[Not[LessEqual[t, -3.7e+209]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{+265} \lor \neg \left(t \leq -3.7 \cdot 10^{+209}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.55000000000000011e265 or -3.7e209 < t Initial program 86.2%
Taylor expanded in z around inf 63.5%
+-commutative63.5%
Simplified63.5%
if -2.55000000000000011e265 < t < -3.7e209Initial program 93.1%
Taylor expanded in x around 0 86.0%
Taylor expanded in z around 0 72.0%
associate-/l*78.8%
Simplified78.8%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.8e-113) x (if (<= x 2.7e-167) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.8e-113) {
tmp = x;
} else if (x <= 2.7e-167) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.8d-113)) then
tmp = x
else if (x <= 2.7d-167) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.8e-113) {
tmp = x;
} else if (x <= 2.7e-167) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.8e-113: tmp = x elif x <= 2.7e-167: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.8e-113) tmp = x; elseif (x <= 2.7e-167) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.8e-113) tmp = x; elseif (x <= 2.7e-167) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.8e-113], x, If[LessEqual[x, 2.7e-167], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-167}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.79999999999999987e-113 or 2.7000000000000001e-167 < x Initial program 86.5%
Taylor expanded in x around inf 59.9%
if -1.79999999999999987e-113 < x < 2.7000000000000001e-167Initial program 86.6%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around inf 42.2%
(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 86.6%
Taylor expanded in z around inf 60.7%
+-commutative60.7%
Simplified60.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 86.6%
Taylor expanded in x around inf 46.2%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024110
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))