
(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.7%
+-commutative97.7%
fma-def97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -3.5e+99)
t_1
(if (<= z -1.3e-58)
(+ x (* y (- 1.0 (/ t z))))
(if (<= z 1.85e-81) (+ x (* y (/ t a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.5e+99) {
tmp = t_1;
} else if (z <= -1.3e-58) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 1.85e-81) {
tmp = x + (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 = x + (y * (z / (z - a)))
if (z <= (-3.5d+99)) then
tmp = t_1
else if (z <= (-1.3d-58)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 1.85d-81) then
tmp = x + (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 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.5e+99) {
tmp = t_1;
} else if (z <= -1.3e-58) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 1.85e-81) {
tmp = x + (y * (t / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -3.5e+99: tmp = t_1 elif z <= -1.3e-58: tmp = x + (y * (1.0 - (t / z))) elif z <= 1.85e-81: tmp = x + (y * (t / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -3.5e+99) tmp = t_1; elseif (z <= -1.3e-58) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 1.85e-81) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -3.5e+99) tmp = t_1; elseif (z <= -1.3e-58) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 1.85e-81) tmp = x + (y * (t / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+99], t$95$1, If[LessEqual[z, -1.3e-58], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-81], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-58}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-81}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.4999999999999998e99 or 1.84999999999999993e-81 < z Initial program 99.9%
Taylor expanded in t around 0 73.7%
expm1-log1p-u62.9%
expm1-udef53.0%
associate-/l*56.8%
associate-/r/56.8%
Applied egg-rr56.8%
expm1-def59.7%
expm1-log1p80.4%
associate-*l/73.7%
associate-*r/87.5%
Simplified87.5%
if -3.4999999999999998e99 < z < -1.30000000000000003e-58Initial program 100.0%
Taylor expanded in a around 0 90.1%
div-sub90.1%
*-inverses90.1%
Simplified90.1%
if -1.30000000000000003e-58 < z < 1.84999999999999993e-81Initial program 93.6%
Taylor expanded in z around 0 77.6%
+-commutative77.6%
associate-/l*77.6%
associate-/r/78.8%
Simplified78.8%
Final simplification84.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -1.5e+98)
t_1
(if (<= z -1.8e-133)
(+ x (/ (* y (- z t)) z))
(if (<= z 2.7e-81) (+ x (* y (/ t a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.5e+98) {
tmp = t_1;
} else if (z <= -1.8e-133) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 2.7e-81) {
tmp = x + (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 = x + (y * (z / (z - a)))
if (z <= (-1.5d+98)) then
tmp = t_1
else if (z <= (-1.8d-133)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 2.7d-81) then
tmp = x + (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 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.5e+98) {
tmp = t_1;
} else if (z <= -1.8e-133) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 2.7e-81) {
tmp = x + (y * (t / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -1.5e+98: tmp = t_1 elif z <= -1.8e-133: tmp = x + ((y * (z - t)) / z) elif z <= 2.7e-81: tmp = x + (y * (t / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -1.5e+98) tmp = t_1; elseif (z <= -1.8e-133) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 2.7e-81) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -1.5e+98) tmp = t_1; elseif (z <= -1.8e-133) tmp = x + ((y * (z - t)) / z); elseif (z <= 2.7e-81) tmp = x + (y * (t / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+98], t$95$1, If[LessEqual[z, -1.8e-133], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-81], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-81}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.5000000000000001e98 or 2.6999999999999999e-81 < z Initial program 99.9%
Taylor expanded in t around 0 73.7%
expm1-log1p-u62.9%
expm1-udef53.0%
associate-/l*56.8%
associate-/r/56.8%
Applied egg-rr56.8%
expm1-def59.7%
expm1-log1p80.4%
associate-*l/73.7%
associate-*r/87.5%
Simplified87.5%
if -1.5000000000000001e98 < z < -1.8000000000000002e-133Initial program 97.7%
Taylor expanded in a around 0 87.4%
if -1.8000000000000002e-133 < z < 2.6999999999999999e-81Initial program 94.0%
Taylor expanded in z around 0 79.6%
+-commutative79.6%
associate-/l*78.5%
associate-/r/79.8%
Simplified79.8%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (- 1.0 (/ a z))))))
(if (<= z -1.8e+100)
t_1
(if (<= z -1.8e-133)
(+ x (/ (* y (- z t)) z))
(if (<= z 2e-81) (+ x (* y (/ t a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (1.0 - (a / z)));
double tmp;
if (z <= -1.8e+100) {
tmp = t_1;
} else if (z <= -1.8e-133) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 2e-81) {
tmp = x + (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 = x + (y / (1.0d0 - (a / z)))
if (z <= (-1.8d+100)) then
tmp = t_1
else if (z <= (-1.8d-133)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 2d-81) then
tmp = x + (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 = x + (y / (1.0 - (a / z)));
double tmp;
if (z <= -1.8e+100) {
tmp = t_1;
} else if (z <= -1.8e-133) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 2e-81) {
tmp = x + (y * (t / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (1.0 - (a / z))) tmp = 0 if z <= -1.8e+100: tmp = t_1 elif z <= -1.8e-133: tmp = x + ((y * (z - t)) / z) elif z <= 2e-81: tmp = x + (y * (t / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(1.0 - Float64(a / z)))) tmp = 0.0 if (z <= -1.8e+100) tmp = t_1; elseif (z <= -1.8e-133) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 2e-81) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (1.0 - (a / z))); tmp = 0.0; if (z <= -1.8e+100) tmp = t_1; elseif (z <= -1.8e-133) tmp = x + ((y * (z - t)) / z); elseif (z <= 2e-81) tmp = x + (y * (t / a)); 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[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+100], t$95$1, If[LessEqual[z, -1.8e-133], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-81], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{1 - \frac{a}{z}}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-81}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.8e100 or 1.9999999999999999e-81 < z Initial program 99.9%
Taylor expanded in t around 0 73.7%
+-commutative73.7%
associate-/l*87.5%
div-sub87.5%
*-inverses87.5%
Simplified87.5%
if -1.8e100 < z < -1.8000000000000002e-133Initial program 97.7%
Taylor expanded in a around 0 87.4%
if -1.8000000000000002e-133 < z < 1.9999999999999999e-81Initial program 94.0%
Taylor expanded in z around 0 79.6%
+-commutative79.6%
associate-/l*78.5%
associate-/r/79.8%
Simplified79.8%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (- 1.0 (/ a z))))))
(if (<= z -5.4e+100)
t_1
(if (<= z -1.8e-133)
(+ x (/ (* y (- z t)) z))
(if (<= z 0.25) (+ x (* (/ y a) (- t z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (1.0 - (a / z)));
double tmp;
if (z <= -5.4e+100) {
tmp = t_1;
} else if (z <= -1.8e-133) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 0.25) {
tmp = x + ((y / a) * (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 + (y / (1.0d0 - (a / z)))
if (z <= (-5.4d+100)) then
tmp = t_1
else if (z <= (-1.8d-133)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 0.25d0) then
tmp = x + ((y / a) * (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 + (y / (1.0 - (a / z)));
double tmp;
if (z <= -5.4e+100) {
tmp = t_1;
} else if (z <= -1.8e-133) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 0.25) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (1.0 - (a / z))) tmp = 0 if z <= -5.4e+100: tmp = t_1 elif z <= -1.8e-133: tmp = x + ((y * (z - t)) / z) elif z <= 0.25: tmp = x + ((y / a) * (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(1.0 - Float64(a / z)))) tmp = 0.0 if (z <= -5.4e+100) tmp = t_1; elseif (z <= -1.8e-133) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 0.25) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (1.0 - (a / z))); tmp = 0.0; if (z <= -5.4e+100) tmp = t_1; elseif (z <= -1.8e-133) tmp = x + ((y * (z - t)) / z); elseif (z <= 0.25) tmp = x + ((y / a) * (t - z)); 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[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+100], t$95$1, If[LessEqual[z, -1.8e-133], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.25], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{1 - \frac{a}{z}}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 0.25:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.39999999999999997e100 or 0.25 < z Initial program 99.9%
Taylor expanded in t around 0 73.1%
+-commutative73.1%
associate-/l*88.9%
div-sub88.9%
*-inverses88.9%
Simplified88.9%
if -5.39999999999999997e100 < z < -1.8000000000000002e-133Initial program 97.7%
Taylor expanded in a around 0 87.4%
if -1.8000000000000002e-133 < z < 0.25Initial program 95.1%
Taylor expanded in a around inf 84.1%
mul-1-neg84.1%
unsub-neg84.1%
associate-/l*84.2%
associate-/r/83.1%
Simplified83.1%
Final simplification86.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.75e+101)
(+ y x)
(if (<= z -3.5e-59)
(- x (* y (/ t z)))
(if (<= z 3.15e+41) (+ x (* y (/ t a))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+101) {
tmp = y + x;
} else if (z <= -3.5e-59) {
tmp = x - (y * (t / z));
} else if (z <= 3.15e+41) {
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) :: tmp
if (z <= (-1.75d+101)) then
tmp = y + x
else if (z <= (-3.5d-59)) then
tmp = x - (y * (t / z))
else if (z <= 3.15d+41) 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 tmp;
if (z <= -1.75e+101) {
tmp = y + x;
} else if (z <= -3.5e-59) {
tmp = x - (y * (t / z));
} else if (z <= 3.15e+41) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+101: tmp = y + x elif z <= -3.5e-59: tmp = x - (y * (t / z)) elif z <= 3.15e+41: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+101) tmp = Float64(y + x); elseif (z <= -3.5e-59) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 3.15e+41) 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) tmp = 0.0; if (z <= -1.75e+101) tmp = y + x; elseif (z <= -3.5e-59) tmp = x - (y * (t / z)); elseif (z <= 3.15e+41) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+101], N[(y + x), $MachinePrecision], If[LessEqual[z, -3.5e-59], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.15e+41], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+101}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-59}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 3.15 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.75000000000000012e101 or 3.1499999999999999e41 < z Initial program 99.9%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -1.75000000000000012e101 < z < -3.5000000000000001e-59Initial program 100.0%
associate-*r/94.1%
Simplified94.1%
Taylor expanded in z around 0 82.9%
mul-1-neg82.9%
distribute-lft-neg-out82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in z around inf 76.9%
mul-1-neg76.9%
unsub-neg76.9%
associate-/l*76.9%
associate-/r/76.9%
Simplified76.9%
if -3.5000000000000001e-59 < z < 3.1499999999999999e41Initial program 95.1%
Taylor expanded in z around 0 77.1%
+-commutative77.1%
associate-/l*77.1%
associate-/r/78.0%
Simplified78.0%
Final simplification77.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.7e+101)
(+ y x)
(if (<= z -1.75e-133)
(- x (/ y (/ z t)))
(if (<= z 5e+37) (+ x (* y (/ t a))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+101) {
tmp = y + x;
} else if (z <= -1.75e-133) {
tmp = x - (y / (z / t));
} else if (z <= 5e+37) {
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) :: tmp
if (z <= (-4.7d+101)) then
tmp = y + x
else if (z <= (-1.75d-133)) then
tmp = x - (y / (z / t))
else if (z <= 5d+37) 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 tmp;
if (z <= -4.7e+101) {
tmp = y + x;
} else if (z <= -1.75e-133) {
tmp = x - (y / (z / t));
} else if (z <= 5e+37) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.7e+101: tmp = y + x elif z <= -1.75e-133: tmp = x - (y / (z / t)) elif z <= 5e+37: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.7e+101) tmp = Float64(y + x); elseif (z <= -1.75e-133) tmp = Float64(x - Float64(y / Float64(z / t))); elseif (z <= 5e+37) 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) tmp = 0.0; if (z <= -4.7e+101) tmp = y + x; elseif (z <= -1.75e-133) tmp = x - (y / (z / t)); elseif (z <= 5e+37) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.7e+101], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.75e-133], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+37], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+101}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-133}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+37}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -4.69999999999999971e101 or 4.99999999999999989e37 < z Initial program 99.9%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -4.69999999999999971e101 < z < -1.75000000000000001e-133Initial program 97.7%
associate-*r/93.2%
Simplified93.2%
Taylor expanded in z around 0 84.6%
mul-1-neg84.6%
distribute-lft-neg-out84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 77.3%
mul-1-neg77.3%
unsub-neg77.3%
associate-/l*77.3%
associate-/r/75.1%
Simplified75.1%
*-commutative75.1%
clear-num75.1%
un-div-inv77.3%
Applied egg-rr77.3%
if -1.75000000000000001e-133 < z < 4.99999999999999989e37Initial program 95.5%
Taylor expanded in z around 0 78.5%
+-commutative78.5%
associate-/l*77.7%
associate-/r/78.6%
Simplified78.6%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.35e+101)
(+ y x)
(if (<= z -1.8e-133)
(- x (/ (* y t) z))
(if (<= z 1.45e+35) (+ x (* y (/ t a))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+101) {
tmp = y + x;
} else if (z <= -1.8e-133) {
tmp = x - ((y * t) / z);
} else if (z <= 1.45e+35) {
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) :: tmp
if (z <= (-2.35d+101)) then
tmp = y + x
else if (z <= (-1.8d-133)) then
tmp = x - ((y * t) / z)
else if (z <= 1.45d+35) 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 tmp;
if (z <= -2.35e+101) {
tmp = y + x;
} else if (z <= -1.8e-133) {
tmp = x - ((y * t) / z);
} else if (z <= 1.45e+35) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.35e+101: tmp = y + x elif z <= -1.8e-133: tmp = x - ((y * t) / z) elif z <= 1.45e+35: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.35e+101) tmp = Float64(y + x); elseif (z <= -1.8e-133) tmp = Float64(x - Float64(Float64(y * t) / z)); elseif (z <= 1.45e+35) 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) tmp = 0.0; if (z <= -2.35e+101) tmp = y + x; elseif (z <= -1.8e-133) tmp = x - ((y * t) / z); elseif (z <= 1.45e+35) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.35e+101], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.8e-133], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+35], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+101}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+35}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.34999999999999985e101 or 1.44999999999999997e35 < z Initial program 99.9%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -2.34999999999999985e101 < z < -1.8000000000000002e-133Initial program 97.7%
associate-*r/93.2%
Simplified93.2%
Taylor expanded in z around 0 84.6%
mul-1-neg84.6%
distribute-lft-neg-out84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in x around 0 84.6%
mul-1-neg84.6%
associate-*r/89.0%
distribute-lft-neg-in89.0%
cancel-sign-sub-inv89.0%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in z around inf 77.3%
if -1.8000000000000002e-133 < z < 1.44999999999999997e35Initial program 95.5%
Taylor expanded in z around 0 78.5%
+-commutative78.5%
associate-/l*77.7%
associate-/r/78.6%
Simplified78.6%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.3e+101)
(+ y x)
(if (<= z -4.4e-134)
(- x (/ t (/ z y)))
(if (<= z 1.5e+41) (+ x (* y (/ t a))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+101) {
tmp = y + x;
} else if (z <= -4.4e-134) {
tmp = x - (t / (z / y));
} else if (z <= 1.5e+41) {
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) :: tmp
if (z <= (-3.3d+101)) then
tmp = y + x
else if (z <= (-4.4d-134)) then
tmp = x - (t / (z / y))
else if (z <= 1.5d+41) 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 tmp;
if (z <= -3.3e+101) {
tmp = y + x;
} else if (z <= -4.4e-134) {
tmp = x - (t / (z / y));
} else if (z <= 1.5e+41) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.3e+101: tmp = y + x elif z <= -4.4e-134: tmp = x - (t / (z / y)) elif z <= 1.5e+41: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e+101) tmp = Float64(y + x); elseif (z <= -4.4e-134) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= 1.5e+41) 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) tmp = 0.0; if (z <= -3.3e+101) tmp = y + x; elseif (z <= -4.4e-134) tmp = x - (t / (z / y)); elseif (z <= 1.5e+41) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+101], N[(y + x), $MachinePrecision], If[LessEqual[z, -4.4e-134], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+41], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+101}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-134}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -3.30000000000000011e101 or 1.4999999999999999e41 < z Initial program 99.9%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -3.30000000000000011e101 < z < -4.3999999999999999e-134Initial program 97.7%
associate-*r/93.2%
Simplified93.2%
Taylor expanded in z around 0 84.6%
mul-1-neg84.6%
distribute-lft-neg-out84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 77.3%
mul-1-neg77.3%
associate-/l*77.3%
distribute-neg-frac77.3%
Simplified77.3%
if -4.3999999999999999e-134 < z < 1.4999999999999999e41Initial program 95.5%
Taylor expanded in z around 0 78.5%
+-commutative78.5%
associate-/l*77.7%
associate-/r/78.6%
Simplified78.6%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.5e-59) (not (<= z 7e+34))) (+ x (* y (- 1.0 (/ t z)))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.5e-59) || !(z <= 7e+34)) {
tmp = x + (y * (1.0 - (t / z)));
} 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 <= (-5.5d-59)) .or. (.not. (z <= 7d+34))) then
tmp = x + (y * (1.0d0 - (t / z)))
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 <= -5.5e-59) || !(z <= 7e+34)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.5e-59) or not (z <= 7e+34): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.5e-59) || !(z <= 7e+34)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); 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 <= -5.5e-59) || ~((z <= 7e+34))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.5e-59], N[Not[LessEqual[z, 7e+34]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-59} \lor \neg \left(z \leq 7 \cdot 10^{+34}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -5.50000000000000014e-59 or 6.99999999999999996e34 < z Initial program 99.9%
Taylor expanded in a around 0 86.2%
div-sub86.2%
*-inverses86.2%
Simplified86.2%
if -5.50000000000000014e-59 < z < 6.99999999999999996e34Initial program 95.1%
Taylor expanded in z around 0 77.1%
+-commutative77.1%
associate-/l*77.1%
associate-/r/78.0%
Simplified78.0%
Final simplification82.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.4e+97) (not (<= z 1.35e+25))) (+ x (/ y (- 1.0 (/ a z)))) (- x (/ (* y t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.4e+97) || !(z <= 1.35e+25)) {
tmp = x + (y / (1.0 - (a / z)));
} else {
tmp = x - ((y * t) / (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 <= (-4.4d+97)) .or. (.not. (z <= 1.35d+25))) then
tmp = x + (y / (1.0d0 - (a / z)))
else
tmp = x - ((y * t) / (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 <= -4.4e+97) || !(z <= 1.35e+25)) {
tmp = x + (y / (1.0 - (a / z)));
} else {
tmp = x - ((y * t) / (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.4e+97) or not (z <= 1.35e+25): tmp = x + (y / (1.0 - (a / z))) else: tmp = x - ((y * t) / (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.4e+97) || !(z <= 1.35e+25)) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / z)))); else tmp = Float64(x - Float64(Float64(y * t) / Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.4e+97) || ~((z <= 1.35e+25))) tmp = x + (y / (1.0 - (a / z))); else tmp = x - ((y * t) / (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e+97], N[Not[LessEqual[z, 1.35e+25]], $MachinePrecision]], N[(x + N[(y / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+97} \lor \neg \left(z \leq 1.35 \cdot 10^{+25}\right):\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\end{array}
\end{array}
if z < -4.4000000000000002e97 or 1.35e25 < z Initial program 99.9%
Taylor expanded in t around 0 73.2%
+-commutative73.2%
associate-/l*89.4%
div-sub89.4%
*-inverses89.4%
Simplified89.4%
if -4.4000000000000002e97 < z < 1.35e25Initial program 95.9%
associate-*r/96.0%
Simplified96.0%
Taylor expanded in z around 0 89.2%
mul-1-neg89.2%
distribute-lft-neg-out89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 89.2%
mul-1-neg89.2%
associate-*r/90.5%
distribute-lft-neg-in90.5%
cancel-sign-sub-inv90.5%
associate-*r/89.2%
Simplified89.2%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.6e-32) (not (<= z 1.85e+33))) (+ y x) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.6e-32) || !(z <= 1.85e+33)) {
tmp = y + x;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.6d-32)) .or. (.not. (z <= 1.85d+33))) then
tmp = y + x
else
tmp = x + (z * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.6e-32) || !(z <= 1.85e+33)) {
tmp = y + x;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.6e-32) or not (z <= 1.85e+33): tmp = y + x else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.6e-32) || !(z <= 1.85e+33)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.6e-32) || ~((z <= 1.85e+33))) tmp = y + x; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e-32], N[Not[LessEqual[z, 1.85e+33]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-32} \lor \neg \left(z \leq 1.85 \cdot 10^{+33}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.6000000000000001e-32 or 1.8499999999999999e33 < z Initial program 99.9%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -1.6000000000000001e-32 < z < 1.8499999999999999e33Initial program 95.2%
Taylor expanded in t around 0 62.4%
Taylor expanded in z around 0 60.8%
mul-1-neg60.8%
associate-/l*60.8%
distribute-neg-frac60.8%
Simplified60.8%
associate-/r/61.6%
add-sqr-sqrt28.8%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod30.1%
add-sqr-sqrt57.3%
Applied egg-rr57.3%
Final simplification65.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.75e+101) (not (<= z 4.1e+40))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.75e+101) || !(z <= 4.1e+40)) {
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 <= (-1.75d+101)) .or. (.not. (z <= 4.1d+40))) 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 <= -1.75e+101) || !(z <= 4.1e+40)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.75e+101) or not (z <= 4.1e+40): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.75e+101) || !(z <= 4.1e+40)) 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 <= -1.75e+101) || ~((z <= 4.1e+40))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.75e+101], N[Not[LessEqual[z, 4.1e+40]], $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 -1.75 \cdot 10^{+101} \lor \neg \left(z \leq 4.1 \cdot 10^{+40}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.75000000000000012e101 or 4.1000000000000002e40 < z Initial program 99.9%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -1.75000000000000012e101 < z < 4.1000000000000002e40Initial program 96.1%
Taylor expanded in z around 0 72.7%
+-commutative72.7%
associate-/l*73.3%
associate-/r/74.0%
Simplified74.0%
Final simplification75.3%
(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.7%
Final simplification97.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e-59) (not (<= z 1.8e+33))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e-59) || !(z <= 1.8e+33)) {
tmp = y + x;
} 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 <= (-9.5d-59)) .or. (.not. (z <= 1.8d+33))) then
tmp = y + x
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 <= -9.5e-59) || !(z <= 1.8e+33)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.5e-59) or not (z <= 1.8e+33): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e-59) || !(z <= 1.8e+33)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.5e-59) || ~((z <= 1.8e+33))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.5e-59], N[Not[LessEqual[z, 1.8e+33]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-59} \lor \neg \left(z \leq 1.8 \cdot 10^{+33}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.4999999999999994e-59 or 1.8000000000000001e33 < z Initial program 99.9%
Taylor expanded in z around inf 71.9%
+-commutative71.9%
Simplified71.9%
if -9.4999999999999994e-59 < z < 1.8000000000000001e33Initial program 95.0%
Taylor expanded in x around inf 56.0%
Final simplification64.6%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.7%
Taylor expanded in x around inf 53.4%
Final simplification53.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 2023318
(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)))))