
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{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)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= y 1.2e-136) (+ x (* (- z t) (/ y a))) (+ x (* y (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.2e-136) {
tmp = x + ((z - t) * (y / a));
} else {
tmp = x + (y * ((z - 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 (y <= 1.2d-136) then
tmp = x + ((z - t) * (y / a))
else
tmp = x + (y * ((z - 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 (y <= 1.2e-136) {
tmp = x + ((z - t) * (y / a));
} else {
tmp = x + (y * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.2e-136: tmp = x + ((z - t) * (y / a)) else: tmp = x + (y * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.2e-136) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.2e-136) tmp = x + ((z - t) * (y / a)); else tmp = x + (y * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.2e-136], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{-136}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if y < 1.1999999999999999e-136Initial program 95.8%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in y around 0 95.8%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
if 1.1999999999999999e-136 < y Initial program 93.9%
associate-/l*99.8%
Simplified99.8%
Final simplification98.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -8.4e-191)
(not (or (<= y 2.8e-164) (and (not (<= y 6e-149)) (<= y 3.5e-79)))))
(* y (/ (- z t) a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.4e-191) || !((y <= 2.8e-164) || (!(y <= 6e-149) && (y <= 3.5e-79)))) {
tmp = y * ((z - t) / a);
} 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 ((y <= (-8.4d-191)) .or. (.not. (y <= 2.8d-164) .or. (.not. (y <= 6d-149)) .and. (y <= 3.5d-79))) then
tmp = y * ((z - t) / a)
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 ((y <= -8.4e-191) || !((y <= 2.8e-164) || (!(y <= 6e-149) && (y <= 3.5e-79)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.4e-191) or not ((y <= 2.8e-164) or (not (y <= 6e-149) and (y <= 3.5e-79))): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.4e-191) || !((y <= 2.8e-164) || (!(y <= 6e-149) && (y <= 3.5e-79)))) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8.4e-191) || ~(((y <= 2.8e-164) || (~((y <= 6e-149)) && (y <= 3.5e-79))))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.4e-191], N[Not[Or[LessEqual[y, 2.8e-164], And[N[Not[LessEqual[y, 6e-149]], $MachinePrecision], LessEqual[y, 3.5e-79]]]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{-191} \lor \neg \left(y \leq 2.8 \cdot 10^{-164} \lor \neg \left(y \leq 6 \cdot 10^{-149}\right) \land y \leq 3.5 \cdot 10^{-79}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.39999999999999941e-191 or 2.8000000000000001e-164 < y < 6.0000000000000003e-149 or 3.5000000000000003e-79 < y Initial program 93.0%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in x around inf 80.1%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in x around 0 70.1%
associate-/l*74.4%
Simplified74.4%
if -8.39999999999999941e-191 < y < 2.8000000000000001e-164 or 6.0000000000000003e-149 < y < 3.5000000000000003e-79Initial program 99.9%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in x around inf 79.7%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.15e-190)
(* (- z t) (/ y a))
(if (or (<= y 2.7e-164) (and (not (<= y 2.3e-149)) (<= y 7e-80)))
x
(* y (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e-190) {
tmp = (z - t) * (y / a);
} else if ((y <= 2.7e-164) || (!(y <= 2.3e-149) && (y <= 7e-80))) {
tmp = x;
} else {
tmp = y * ((z - 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 (y <= (-1.15d-190)) then
tmp = (z - t) * (y / a)
else if ((y <= 2.7d-164) .or. (.not. (y <= 2.3d-149)) .and. (y <= 7d-80)) then
tmp = x
else
tmp = y * ((z - 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 (y <= -1.15e-190) {
tmp = (z - t) * (y / a);
} else if ((y <= 2.7e-164) || (!(y <= 2.3e-149) && (y <= 7e-80))) {
tmp = x;
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.15e-190: tmp = (z - t) * (y / a) elif (y <= 2.7e-164) or (not (y <= 2.3e-149) and (y <= 7e-80)): tmp = x else: tmp = y * ((z - t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.15e-190) tmp = Float64(Float64(z - t) * Float64(y / a)); elseif ((y <= 2.7e-164) || (!(y <= 2.3e-149) && (y <= 7e-80))) tmp = x; else tmp = Float64(y * Float64(Float64(z - t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.15e-190) tmp = (z - t) * (y / a); elseif ((y <= 2.7e-164) || (~((y <= 2.3e-149)) && (y <= 7e-80))) tmp = x; else tmp = y * ((z - t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.15e-190], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.7e-164], And[N[Not[LessEqual[y, 2.3e-149]], $MachinePrecision], LessEqual[y, 7e-80]]], x, N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-190}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-164} \lor \neg \left(y \leq 2.3 \cdot 10^{-149}\right) \land y \leq 7 \cdot 10^{-80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if y < -1.14999999999999996e-190Initial program 92.7%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in x around inf 84.2%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around 0 64.0%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around 0 64.0%
associate-*l/98.8%
*-commutative98.8%
Simplified70.1%
if -1.14999999999999996e-190 < y < 2.7000000000000001e-164 or 2.3e-149 < y < 7.00000000000000029e-80Initial program 99.9%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in x around inf 79.7%
if 2.7000000000000001e-164 < y < 2.3e-149 or 7.00000000000000029e-80 < y Initial program 93.3%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in x around inf 75.6%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in x around 0 76.7%
associate-/l*81.1%
Simplified81.1%
Final simplification76.7%
(FPCore (x y z t a)
:precision binary64
(if (<= y -0.058)
(/ y (/ a z))
(if (<= y 28000000.0)
x
(if (or (<= y 1e+129) (not (<= y 1.52e+150)))
(* y (/ (- t) a))
(* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.058) {
tmp = y / (a / z);
} else if (y <= 28000000.0) {
tmp = x;
} else if ((y <= 1e+129) || !(y <= 1.52e+150)) {
tmp = y * (-t / a);
} else {
tmp = y * (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 (y <= (-0.058d0)) then
tmp = y / (a / z)
else if (y <= 28000000.0d0) then
tmp = x
else if ((y <= 1d+129) .or. (.not. (y <= 1.52d+150))) then
tmp = y * (-t / a)
else
tmp = y * (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 (y <= -0.058) {
tmp = y / (a / z);
} else if (y <= 28000000.0) {
tmp = x;
} else if ((y <= 1e+129) || !(y <= 1.52e+150)) {
tmp = y * (-t / a);
} else {
tmp = y * (z / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.058: tmp = y / (a / z) elif y <= 28000000.0: tmp = x elif (y <= 1e+129) or not (y <= 1.52e+150): tmp = y * (-t / a) else: tmp = y * (z / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.058) tmp = Float64(y / Float64(a / z)); elseif (y <= 28000000.0) tmp = x; elseif ((y <= 1e+129) || !(y <= 1.52e+150)) tmp = Float64(y * Float64(Float64(-t) / a)); else tmp = Float64(y * Float64(z / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.058) tmp = y / (a / z); elseif (y <= 28000000.0) tmp = x; elseif ((y <= 1e+129) || ~((y <= 1.52e+150))) tmp = y * (-t / a); else tmp = y * (z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.058], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 28000000.0], x, If[Or[LessEqual[y, 1e+129], N[Not[LessEqual[y, 1.52e+150]], $MachinePrecision]], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.058:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq 28000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 10^{+129} \lor \neg \left(y \leq 1.52 \cdot 10^{+150}\right):\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if y < -0.0580000000000000029Initial program 87.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.9%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 55.0%
associate-*r/62.8%
Simplified62.8%
clear-num62.8%
un-div-inv62.8%
Applied egg-rr62.8%
if -0.0580000000000000029 < y < 2.8e7Initial program 99.8%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.4%
if 2.8e7 < y < 1e129 or 1.52e150 < y Initial program 95.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 76.8%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in t around inf 63.2%
associate-*r/63.2%
neg-mul-163.2%
distribute-rgt-neg-in63.2%
associate-*l/63.2%
Simplified63.2%
if 1e129 < y < 1.52e150Initial program 43.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 23.3%
associate-/l*25.1%
Simplified25.1%
Taylor expanded in z around inf 43.2%
associate-*r/99.7%
Simplified99.7%
Final simplification62.8%
(FPCore (x y z t a)
:precision binary64
(if (<= y -0.052)
(/ y (/ a z))
(if (<= y 100000.0)
x
(if (<= y 1.2e+129)
(/ y (/ a (- t)))
(if (<= y 1.2e+151) (* y (/ z a)) (* y (/ (- t) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.052) {
tmp = y / (a / z);
} else if (y <= 100000.0) {
tmp = x;
} else if (y <= 1.2e+129) {
tmp = y / (a / -t);
} else if (y <= 1.2e+151) {
tmp = y * (z / a);
} 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 (y <= (-0.052d0)) then
tmp = y / (a / z)
else if (y <= 100000.0d0) then
tmp = x
else if (y <= 1.2d+129) then
tmp = y / (a / -t)
else if (y <= 1.2d+151) then
tmp = y * (z / a)
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 (y <= -0.052) {
tmp = y / (a / z);
} else if (y <= 100000.0) {
tmp = x;
} else if (y <= 1.2e+129) {
tmp = y / (a / -t);
} else if (y <= 1.2e+151) {
tmp = y * (z / a);
} else {
tmp = y * (-t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.052: tmp = y / (a / z) elif y <= 100000.0: tmp = x elif y <= 1.2e+129: tmp = y / (a / -t) elif y <= 1.2e+151: tmp = y * (z / a) else: tmp = y * (-t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.052) tmp = Float64(y / Float64(a / z)); elseif (y <= 100000.0) tmp = x; elseif (y <= 1.2e+129) tmp = Float64(y / Float64(a / Float64(-t))); elseif (y <= 1.2e+151) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y * Float64(Float64(-t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.052) tmp = y / (a / z); elseif (y <= 100000.0) tmp = x; elseif (y <= 1.2e+129) tmp = y / (a / -t); elseif (y <= 1.2e+151) tmp = y * (z / a); else tmp = y * (-t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.052], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 100000.0], x, If[LessEqual[y, 1.2e+129], N[(y / N[(a / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+151], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.052:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq 100000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+129}:\\
\;\;\;\;\frac{y}{\frac{a}{-t}}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+151}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\end{array}
\end{array}
if y < -0.0519999999999999976Initial program 87.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.9%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 55.0%
associate-*r/62.8%
Simplified62.8%
clear-num62.8%
un-div-inv62.8%
Applied egg-rr62.8%
if -0.0519999999999999976 < y < 1e5Initial program 99.8%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.4%
if 1e5 < y < 1.1999999999999999e129Initial program 96.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 68.4%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in t around inf 62.6%
mul-1-neg62.6%
*-commutative62.6%
associate-*l/62.4%
associate-/r/62.5%
distribute-neg-frac262.5%
Simplified62.5%
if 1.1999999999999999e129 < y < 1.20000000000000005e151Initial program 43.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 23.3%
associate-/l*25.1%
Simplified25.1%
Taylor expanded in z around inf 43.2%
associate-*r/99.7%
Simplified99.7%
if 1.20000000000000005e151 < y Initial program 93.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 84.4%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in t around inf 63.7%
associate-*r/63.7%
neg-mul-163.7%
distribute-rgt-neg-in63.7%
associate-*l/64.0%
Simplified64.0%
Final simplification62.9%
(FPCore (x y z t a)
:precision binary64
(if (<= y -0.225)
(/ y (/ a z))
(if (<= y 31000000000000.0)
x
(if (<= y 4.8e+129)
(/ (* y (- t)) a)
(if (<= y 4.5e+149) (* y (/ z a)) (* y (/ (- t) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.225) {
tmp = y / (a / z);
} else if (y <= 31000000000000.0) {
tmp = x;
} else if (y <= 4.8e+129) {
tmp = (y * -t) / a;
} else if (y <= 4.5e+149) {
tmp = y * (z / a);
} 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 (y <= (-0.225d0)) then
tmp = y / (a / z)
else if (y <= 31000000000000.0d0) then
tmp = x
else if (y <= 4.8d+129) then
tmp = (y * -t) / a
else if (y <= 4.5d+149) then
tmp = y * (z / a)
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 (y <= -0.225) {
tmp = y / (a / z);
} else if (y <= 31000000000000.0) {
tmp = x;
} else if (y <= 4.8e+129) {
tmp = (y * -t) / a;
} else if (y <= 4.5e+149) {
tmp = y * (z / a);
} else {
tmp = y * (-t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.225: tmp = y / (a / z) elif y <= 31000000000000.0: tmp = x elif y <= 4.8e+129: tmp = (y * -t) / a elif y <= 4.5e+149: tmp = y * (z / a) else: tmp = y * (-t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.225) tmp = Float64(y / Float64(a / z)); elseif (y <= 31000000000000.0) tmp = x; elseif (y <= 4.8e+129) tmp = Float64(Float64(y * Float64(-t)) / a); elseif (y <= 4.5e+149) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y * Float64(Float64(-t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.225) tmp = y / (a / z); elseif (y <= 31000000000000.0) tmp = x; elseif (y <= 4.8e+129) tmp = (y * -t) / a; elseif (y <= 4.5e+149) tmp = y * (z / a); else tmp = y * (-t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.225], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 31000000000000.0], x, If[LessEqual[y, 4.8e+129], N[(N[(y * (-t)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 4.5e+149], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.225:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq 31000000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+129}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{a}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+149}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\end{array}
\end{array}
if y < -0.225000000000000006Initial program 87.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.9%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 55.0%
associate-*r/62.8%
Simplified62.8%
clear-num62.8%
un-div-inv62.8%
Applied egg-rr62.8%
if -0.225000000000000006 < y < 3.1e13Initial program 99.8%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.4%
if 3.1e13 < y < 4.7999999999999997e129Initial program 96.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 68.4%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in x around 0 76.6%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 62.6%
associate-*r/62.6%
mul-1-neg62.6%
distribute-lft-neg-out62.6%
*-commutative62.6%
Simplified62.6%
if 4.7999999999999997e129 < y < 4.49999999999999982e149Initial program 43.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 23.3%
associate-/l*25.1%
Simplified25.1%
Taylor expanded in z around inf 43.2%
associate-*r/99.7%
Simplified99.7%
if 4.49999999999999982e149 < y Initial program 93.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 84.4%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in t around inf 63.7%
associate-*r/63.7%
neg-mul-163.7%
distribute-rgt-neg-in63.7%
associate-*l/64.0%
Simplified64.0%
Final simplification62.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= z -1.6e-39)
t_1
(if (<= z 36.0)
(- x (* t (/ y a)))
(if (<= z 4.1e+206) (* (- z t) (/ y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (z <= -1.6e-39) {
tmp = t_1;
} else if (z <= 36.0) {
tmp = x - (t * (y / a));
} else if (z <= 4.1e+206) {
tmp = (z - t) * (y / 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 + (z * (y / a))
if (z <= (-1.6d-39)) then
tmp = t_1
else if (z <= 36.0d0) then
tmp = x - (t * (y / a))
else if (z <= 4.1d+206) then
tmp = (z - t) * (y / 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 + (z * (y / a));
double tmp;
if (z <= -1.6e-39) {
tmp = t_1;
} else if (z <= 36.0) {
tmp = x - (t * (y / a));
} else if (z <= 4.1e+206) {
tmp = (z - t) * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if z <= -1.6e-39: tmp = t_1 elif z <= 36.0: tmp = x - (t * (y / a)) elif z <= 4.1e+206: tmp = (z - t) * (y / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (z <= -1.6e-39) tmp = t_1; elseif (z <= 36.0) tmp = Float64(x - Float64(t * Float64(y / a))); elseif (z <= 4.1e+206) tmp = Float64(Float64(z - t) * Float64(y / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (z <= -1.6e-39) tmp = t_1; elseif (z <= 36.0) tmp = x - (t * (y / a)); elseif (z <= 4.1e+206) tmp = (z - t) * (y / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-39], t$95$1, If[LessEqual[z, 36.0], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+206], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 36:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+206}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5999999999999999e-39 or 4.1000000000000003e206 < z Initial program 90.5%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around 0 82.9%
+-commutative82.9%
associate-/l*81.5%
Simplified81.5%
clear-num55.5%
un-div-inv55.5%
Applied egg-rr82.5%
associate-/r/88.5%
Applied egg-rr88.5%
if -1.5999999999999999e-39 < z < 36Initial program 99.1%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in y around 0 99.1%
associate-*l/96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in z around 0 92.8%
associate-*l/91.3%
*-commutative91.3%
neg-mul-191.3%
sub-neg91.3%
*-commutative91.3%
associate-*l/92.8%
associate-*r/92.8%
Simplified92.8%
if 36 < z < 4.1000000000000003e206Initial program 93.9%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in x around inf 79.0%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in x around 0 82.1%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in y around 0 82.1%
associate-*l/99.9%
*-commutative99.9%
Simplified88.1%
Final simplification90.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= z -1.55e-44)
t_1
(if (<= z 0.0018)
(- x (/ (* y t) a))
(if (<= z 3.8e+206) (* (- z t) (/ y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (z <= -1.55e-44) {
tmp = t_1;
} else if (z <= 0.0018) {
tmp = x - ((y * t) / a);
} else if (z <= 3.8e+206) {
tmp = (z - t) * (y / 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 + (z * (y / a))
if (z <= (-1.55d-44)) then
tmp = t_1
else if (z <= 0.0018d0) then
tmp = x - ((y * t) / a)
else if (z <= 3.8d+206) then
tmp = (z - t) * (y / 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 + (z * (y / a));
double tmp;
if (z <= -1.55e-44) {
tmp = t_1;
} else if (z <= 0.0018) {
tmp = x - ((y * t) / a);
} else if (z <= 3.8e+206) {
tmp = (z - t) * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if z <= -1.55e-44: tmp = t_1 elif z <= 0.0018: tmp = x - ((y * t) / a) elif z <= 3.8e+206: tmp = (z - t) * (y / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (z <= -1.55e-44) tmp = t_1; elseif (z <= 0.0018) tmp = Float64(x - Float64(Float64(y * t) / a)); elseif (z <= 3.8e+206) tmp = Float64(Float64(z - t) * Float64(y / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (z <= -1.55e-44) tmp = t_1; elseif (z <= 0.0018) tmp = x - ((y * t) / a); elseif (z <= 3.8e+206) tmp = (z - t) * (y / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e-44], t$95$1, If[LessEqual[z, 0.0018], N[(x - N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+206], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0018:\\
\;\;\;\;x - \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+206}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.54999999999999992e-44 or 3.7999999999999999e206 < z Initial program 90.6%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around 0 83.0%
+-commutative83.0%
associate-/l*81.7%
Simplified81.7%
clear-num55.9%
un-div-inv56.0%
Applied egg-rr82.6%
associate-/r/88.7%
Applied egg-rr88.7%
if -1.54999999999999992e-44 < z < 0.0018Initial program 99.1%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in z around 0 93.6%
+-commutative93.6%
associate-*r/93.6%
mul-1-neg93.6%
distribute-lft-neg-out93.6%
*-commutative93.6%
Simplified93.6%
if 0.0018 < z < 3.7999999999999999e206Initial program 93.9%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in x around inf 79.0%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in x around 0 82.1%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in y around 0 82.1%
associate-*l/99.9%
*-commutative99.9%
Simplified88.1%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.15e-190) (not (<= y 5e-208))) (+ x (* y (/ (- z t) a))) (+ x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.15e-190) || !(y <= 5e-208)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + ((y * 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 ((y <= (-2.15d-190)) .or. (.not. (y <= 5d-208))) then
tmp = x + (y * ((z - t) / a))
else
tmp = x + ((y * 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 ((y <= -2.15e-190) || !(y <= 5e-208)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.15e-190) or not (y <= 5e-208): tmp = x + (y * ((z - t) / a)) else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.15e-190) || !(y <= 5e-208)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.15e-190) || ~((y <= 5e-208))) tmp = x + (y * ((z - t) / a)); else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.15e-190], N[Not[LessEqual[y, 5e-208]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-190} \lor \neg \left(y \leq 5 \cdot 10^{-208}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if y < -2.15e-190 or 4.99999999999999963e-208 < y Initial program 93.9%
associate-/l*97.6%
Simplified97.6%
if -2.15e-190 < y < 4.99999999999999963e-208Initial program 99.9%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in z around inf 96.0%
Final simplification97.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+50) (not (<= y 23000000000000.0))) (* y (/ (- z t) a)) (+ x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+50) || !(y <= 23000000000000.0)) {
tmp = y * ((z - t) / a);
} else {
tmp = x + ((y * 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 ((y <= (-5.8d+50)) .or. (.not. (y <= 23000000000000.0d0))) then
tmp = y * ((z - t) / a)
else
tmp = x + ((y * 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 ((y <= -5.8e+50) || !(y <= 23000000000000.0)) {
tmp = y * ((z - t) / a);
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.8e+50) or not (y <= 23000000000000.0): tmp = y * ((z - t) / a) else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+50) || !(y <= 23000000000000.0)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.8e+50) || ~((y <= 23000000000000.0))) tmp = y * ((z - t) / a); else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+50], N[Not[LessEqual[y, 23000000000000.0]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+50} \lor \neg \left(y \leq 23000000000000\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if y < -5.8e50 or 2.3e13 < y Initial program 88.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 75.3%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in x around 0 75.2%
associate-/l*86.0%
Simplified86.0%
if -5.8e50 < y < 2.3e13Initial program 99.8%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in z around inf 84.2%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -0.15) (not (<= y 1.85e+111))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -0.15) || !(y <= 1.85e+111)) {
tmp = y * (z / a);
} 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 ((y <= (-0.15d0)) .or. (.not. (y <= 1.85d+111))) then
tmp = y * (z / a)
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 ((y <= -0.15) || !(y <= 1.85e+111)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -0.15) or not (y <= 1.85e+111): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -0.15) || !(y <= 1.85e+111)) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -0.15) || ~((y <= 1.85e+111))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -0.15], N[Not[LessEqual[y, 1.85e+111]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.15 \lor \neg \left(y \leq 1.85 \cdot 10^{+111}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.149999999999999994 or 1.8500000000000001e111 < y Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 79.7%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in z around inf 49.4%
associate-*r/56.9%
Simplified56.9%
if -0.149999999999999994 < y < 1.8500000000000001e111Initial program 99.3%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 57.0%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -0.0135) (/ y (/ a z)) (if (<= y 2.1e+111) x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.0135) {
tmp = y / (a / z);
} else if (y <= 2.1e+111) {
tmp = x;
} else {
tmp = y * (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 (y <= (-0.0135d0)) then
tmp = y / (a / z)
else if (y <= 2.1d+111) then
tmp = x
else
tmp = y * (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 (y <= -0.0135) {
tmp = y / (a / z);
} else if (y <= 2.1e+111) {
tmp = x;
} else {
tmp = y * (z / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.0135: tmp = y / (a / z) elif y <= 2.1e+111: tmp = x else: tmp = y * (z / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.0135) tmp = Float64(y / Float64(a / z)); elseif (y <= 2.1e+111) tmp = x; else tmp = Float64(y * Float64(z / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.0135) tmp = y / (a / z); elseif (y <= 2.1e+111) tmp = x; else tmp = y * (z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.0135], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+111], x, N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0135:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if y < -0.0134999999999999998Initial program 87.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.9%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 55.0%
associate-*r/62.8%
Simplified62.8%
clear-num62.8%
un-div-inv62.8%
Applied egg-rr62.8%
if -0.0134999999999999998 < y < 2.09999999999999995e111Initial program 99.3%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 57.0%
if 2.09999999999999995e111 < y Initial program 88.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 74.0%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in z around inf 41.8%
associate-*r/48.8%
Simplified48.8%
Final simplification56.9%
(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 95.1%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in x around inf 41.6%
Final simplification41.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(+ x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(+ x (/ (* y (- z t)) a))
(+ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / 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 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x + (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) / a)
else
tmp = x + (y / 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 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x + (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) / a) else: tmp = x + (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x + Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x + Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x + (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) / a); else tmp = x + (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x + N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024066
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))