
(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 14 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 (+ x (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
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 + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a): return x + ((t - z) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
Initial program 93.6%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in y around 0 93.6%
*-commutative93.6%
associate-/l*98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y) (/ a z))))
(if (<= a -5.1e+25)
x
(if (<= a -1.9e-54)
t_1
(if (<= a -8e-125)
(/ t (/ a y))
(if (<= a -3.1e-288) t_1 (if (<= a 2.55e-33) (* t (/ y a)) x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y / (a / z);
double tmp;
if (a <= -5.1e+25) {
tmp = x;
} else if (a <= -1.9e-54) {
tmp = t_1;
} else if (a <= -8e-125) {
tmp = t / (a / y);
} else if (a <= -3.1e-288) {
tmp = t_1;
} else if (a <= 2.55e-33) {
tmp = t * (y / 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) :: t_1
real(8) :: tmp
t_1 = -y / (a / z)
if (a <= (-5.1d+25)) then
tmp = x
else if (a <= (-1.9d-54)) then
tmp = t_1
else if (a <= (-8d-125)) then
tmp = t / (a / y)
else if (a <= (-3.1d-288)) then
tmp = t_1
else if (a <= 2.55d-33) then
tmp = t * (y / 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 t_1 = -y / (a / z);
double tmp;
if (a <= -5.1e+25) {
tmp = x;
} else if (a <= -1.9e-54) {
tmp = t_1;
} else if (a <= -8e-125) {
tmp = t / (a / y);
} else if (a <= -3.1e-288) {
tmp = t_1;
} else if (a <= 2.55e-33) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y / (a / z) tmp = 0 if a <= -5.1e+25: tmp = x elif a <= -1.9e-54: tmp = t_1 elif a <= -8e-125: tmp = t / (a / y) elif a <= -3.1e-288: tmp = t_1 elif a <= 2.55e-33: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) / Float64(a / z)) tmp = 0.0 if (a <= -5.1e+25) tmp = x; elseif (a <= -1.9e-54) tmp = t_1; elseif (a <= -8e-125) tmp = Float64(t / Float64(a / y)); elseif (a <= -3.1e-288) tmp = t_1; elseif (a <= 2.55e-33) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y / (a / z); tmp = 0.0; if (a <= -5.1e+25) tmp = x; elseif (a <= -1.9e-54) tmp = t_1; elseif (a <= -8e-125) tmp = t / (a / y); elseif (a <= -3.1e-288) tmp = t_1; elseif (a <= 2.55e-33) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+25], x, If[LessEqual[a, -1.9e-54], t$95$1, If[LessEqual[a, -8e-125], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.1e-288], t$95$1, If[LessEqual[a, 2.55e-33], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-y}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -5.1 \cdot 10^{+25}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-125}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.55 \cdot 10^{-33}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.1000000000000004e25 or 2.55000000000000004e-33 < a Initial program 88.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in x around inf 65.9%
if -5.1000000000000004e25 < a < -1.9000000000000001e-54 or -8.0000000000000001e-125 < a < -3.09999999999999983e-288Initial program 99.8%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in z around inf 69.1%
mul-1-neg69.1%
associate-/l*63.5%
Simplified63.5%
if -1.9000000000000001e-54 < a < -8.0000000000000001e-125Initial program 99.9%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 53.0%
associate-/l*59.1%
Simplified59.1%
if -3.09999999999999983e-288 < a < 2.55000000000000004e-33Initial program 98.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 98.2%
*-commutative98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 56.5%
associate-*r/61.8%
Simplified61.8%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.1e+27)
x
(if (<= a -5.2e-54)
(/ (- y) (/ a z))
(if (<= a -1.55e-126)
(/ t (/ a y))
(if (<= a -8.8e-290)
(* z (/ y (- a)))
(if (<= a 1e-33) (* t (/ y a)) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e+27) {
tmp = x;
} else if (a <= -5.2e-54) {
tmp = -y / (a / z);
} else if (a <= -1.55e-126) {
tmp = t / (a / y);
} else if (a <= -8.8e-290) {
tmp = z * (y / -a);
} else if (a <= 1e-33) {
tmp = t * (y / 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 (a <= (-2.1d+27)) then
tmp = x
else if (a <= (-5.2d-54)) then
tmp = -y / (a / z)
else if (a <= (-1.55d-126)) then
tmp = t / (a / y)
else if (a <= (-8.8d-290)) then
tmp = z * (y / -a)
else if (a <= 1d-33) then
tmp = t * (y / 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 (a <= -2.1e+27) {
tmp = x;
} else if (a <= -5.2e-54) {
tmp = -y / (a / z);
} else if (a <= -1.55e-126) {
tmp = t / (a / y);
} else if (a <= -8.8e-290) {
tmp = z * (y / -a);
} else if (a <= 1e-33) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.1e+27: tmp = x elif a <= -5.2e-54: tmp = -y / (a / z) elif a <= -1.55e-126: tmp = t / (a / y) elif a <= -8.8e-290: tmp = z * (y / -a) elif a <= 1e-33: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.1e+27) tmp = x; elseif (a <= -5.2e-54) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (a <= -1.55e-126) tmp = Float64(t / Float64(a / y)); elseif (a <= -8.8e-290) tmp = Float64(z * Float64(y / Float64(-a))); elseif (a <= 1e-33) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.1e+27) tmp = x; elseif (a <= -5.2e-54) tmp = -y / (a / z); elseif (a <= -1.55e-126) tmp = t / (a / y); elseif (a <= -8.8e-290) tmp = z * (y / -a); elseif (a <= 1e-33) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e+27], x, If[LessEqual[a, -5.2e-54], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.55e-126], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.8e-290], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e-33], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{-126}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq -8.8 \cdot 10^{-290}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;a \leq 10^{-33}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.09999999999999995e27 or 1.0000000000000001e-33 < a Initial program 88.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in x around inf 65.9%
if -2.09999999999999995e27 < a < -5.20000000000000004e-54Initial program 99.6%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 54.9%
mul-1-neg54.9%
associate-/l*55.1%
Simplified55.1%
if -5.20000000000000004e-54 < a < -1.5500000000000001e-126Initial program 99.9%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 53.0%
associate-/l*59.1%
Simplified59.1%
if -1.5500000000000001e-126 < a < -8.8000000000000004e-290Initial program 99.9%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in z around inf 81.6%
mul-1-neg81.6%
associate-*l/74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
*-lft-identity74.7%
associate-*l/74.8%
remove-double-neg74.8%
neg-mul-174.8%
associate-*r*74.8%
*-commutative74.8%
neg-mul-174.8%
*-commutative74.8%
distribute-neg-frac74.8%
metadata-eval74.8%
metadata-eval74.8%
associate-/r*74.8%
neg-mul-174.8%
associate-*r/74.7%
*-rgt-identity74.7%
distribute-frac-neg74.7%
remove-double-neg74.7%
Simplified74.7%
if -8.8000000000000004e-290 < a < 1.0000000000000001e-33Initial program 98.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 98.2%
*-commutative98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 56.5%
associate-*r/61.8%
Simplified61.8%
Final simplification64.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -6e+25)
x
(if (<= a -2.6e-53)
(/ (- y) (/ a z))
(if (<= a -2.1e-124)
(/ t (/ a y))
(if (<= a -3.7e-289)
(/ (- z) (/ a y))
(if (<= a 1.18e-29) (* t (/ y a)) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e+25) {
tmp = x;
} else if (a <= -2.6e-53) {
tmp = -y / (a / z);
} else if (a <= -2.1e-124) {
tmp = t / (a / y);
} else if (a <= -3.7e-289) {
tmp = -z / (a / y);
} else if (a <= 1.18e-29) {
tmp = t * (y / 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 (a <= (-6d+25)) then
tmp = x
else if (a <= (-2.6d-53)) then
tmp = -y / (a / z)
else if (a <= (-2.1d-124)) then
tmp = t / (a / y)
else if (a <= (-3.7d-289)) then
tmp = -z / (a / y)
else if (a <= 1.18d-29) then
tmp = t * (y / 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 (a <= -6e+25) {
tmp = x;
} else if (a <= -2.6e-53) {
tmp = -y / (a / z);
} else if (a <= -2.1e-124) {
tmp = t / (a / y);
} else if (a <= -3.7e-289) {
tmp = -z / (a / y);
} else if (a <= 1.18e-29) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6e+25: tmp = x elif a <= -2.6e-53: tmp = -y / (a / z) elif a <= -2.1e-124: tmp = t / (a / y) elif a <= -3.7e-289: tmp = -z / (a / y) elif a <= 1.18e-29: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6e+25) tmp = x; elseif (a <= -2.6e-53) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (a <= -2.1e-124) tmp = Float64(t / Float64(a / y)); elseif (a <= -3.7e-289) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (a <= 1.18e-29) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6e+25) tmp = x; elseif (a <= -2.6e-53) tmp = -y / (a / z); elseif (a <= -2.1e-124) tmp = t / (a / y); elseif (a <= -3.7e-289) tmp = -z / (a / y); elseif (a <= 1.18e-29) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e+25], x, If[LessEqual[a, -2.6e-53], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.1e-124], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.7e-289], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.18e-29], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+25}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-124}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-289}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 1.18 \cdot 10^{-29}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.00000000000000011e25 or 1.17999999999999996e-29 < a Initial program 88.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in x around inf 65.9%
if -6.00000000000000011e25 < a < -2.59999999999999996e-53Initial program 99.6%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 54.9%
mul-1-neg54.9%
associate-/l*55.1%
Simplified55.1%
if -2.59999999999999996e-53 < a < -2.1000000000000001e-124Initial program 99.9%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 53.0%
associate-/l*59.1%
Simplified59.1%
if -2.1000000000000001e-124 < a < -3.69999999999999989e-289Initial program 99.9%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in z around inf 81.6%
mul-1-neg81.6%
associate-*l/74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
*-lft-identity74.7%
associate-*l/74.8%
remove-double-neg74.8%
neg-mul-174.8%
associate-*r*74.8%
*-commutative74.8%
neg-mul-174.8%
*-commutative74.8%
distribute-neg-frac74.8%
metadata-eval74.8%
metadata-eval74.8%
associate-/r*74.8%
neg-mul-174.8%
associate-*r/74.7%
*-rgt-identity74.7%
distribute-frac-neg74.7%
remove-double-neg74.7%
Simplified74.7%
add-sqr-sqrt29.6%
sqrt-unprod29.9%
frac-times18.8%
sqr-neg18.8%
frac-times29.9%
sqrt-unprod0.3%
add-sqr-sqrt8.2%
clear-num8.2%
div-inv8.2%
frac-2neg8.2%
distribute-frac-neg8.2%
add-sqr-sqrt8.2%
sqrt-unprod8.1%
sqr-neg8.1%
sqrt-unprod0.0%
add-sqr-sqrt74.7%
Applied egg-rr74.7%
if -3.69999999999999989e-289 < a < 1.17999999999999996e-29Initial program 98.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 98.2%
*-commutative98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 56.5%
associate-*r/61.8%
Simplified61.8%
Final simplification64.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.5e+27)
x
(if (<= a -2.55e-54)
(/ (- y) (/ a z))
(if (<= a -5.8e-125)
(/ t (/ a y))
(if (<= a -2.9e-288)
(/ (* z (- y)) a)
(if (<= a 7.6e-32) (* t (/ y a)) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e+27) {
tmp = x;
} else if (a <= -2.55e-54) {
tmp = -y / (a / z);
} else if (a <= -5.8e-125) {
tmp = t / (a / y);
} else if (a <= -2.9e-288) {
tmp = (z * -y) / a;
} else if (a <= 7.6e-32) {
tmp = t * (y / 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 (a <= (-3.5d+27)) then
tmp = x
else if (a <= (-2.55d-54)) then
tmp = -y / (a / z)
else if (a <= (-5.8d-125)) then
tmp = t / (a / y)
else if (a <= (-2.9d-288)) then
tmp = (z * -y) / a
else if (a <= 7.6d-32) then
tmp = t * (y / 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 (a <= -3.5e+27) {
tmp = x;
} else if (a <= -2.55e-54) {
tmp = -y / (a / z);
} else if (a <= -5.8e-125) {
tmp = t / (a / y);
} else if (a <= -2.9e-288) {
tmp = (z * -y) / a;
} else if (a <= 7.6e-32) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.5e+27: tmp = x elif a <= -2.55e-54: tmp = -y / (a / z) elif a <= -5.8e-125: tmp = t / (a / y) elif a <= -2.9e-288: tmp = (z * -y) / a elif a <= 7.6e-32: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.5e+27) tmp = x; elseif (a <= -2.55e-54) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (a <= -5.8e-125) tmp = Float64(t / Float64(a / y)); elseif (a <= -2.9e-288) tmp = Float64(Float64(z * Float64(-y)) / a); elseif (a <= 7.6e-32) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.5e+27) tmp = x; elseif (a <= -2.55e-54) tmp = -y / (a / z); elseif (a <= -5.8e-125) tmp = t / (a / y); elseif (a <= -2.9e-288) tmp = (z * -y) / a; elseif (a <= 7.6e-32) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+27], x, If[LessEqual[a, -2.55e-54], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.8e-125], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.9e-288], N[(N[(z * (-y)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 7.6e-32], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.55 \cdot 10^{-54}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-288}:\\
\;\;\;\;\frac{z \cdot \left(-y\right)}{a}\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-32}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.5000000000000002e27 or 7.60000000000000015e-32 < a Initial program 88.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in x around inf 65.9%
if -3.5000000000000002e27 < a < -2.55000000000000005e-54Initial program 99.6%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 54.9%
mul-1-neg54.9%
associate-/l*55.1%
Simplified55.1%
if -2.55000000000000005e-54 < a < -5.8000000000000004e-125Initial program 99.9%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 53.0%
associate-/l*59.1%
Simplified59.1%
if -5.8000000000000004e-125 < a < -2.90000000000000015e-288Initial program 99.9%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in z around inf 81.6%
mul-1-neg81.6%
associate-*l/74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
*-lft-identity74.7%
associate-*l/74.8%
remove-double-neg74.8%
neg-mul-174.8%
associate-*r*74.8%
*-commutative74.8%
neg-mul-174.8%
*-commutative74.8%
distribute-neg-frac74.8%
metadata-eval74.8%
metadata-eval74.8%
associate-/r*74.8%
neg-mul-174.8%
associate-*r/74.7%
*-rgt-identity74.7%
distribute-frac-neg74.7%
remove-double-neg74.7%
Simplified74.7%
*-commutative74.7%
frac-2neg74.7%
remove-double-neg74.7%
associate-*l/81.6%
Applied egg-rr81.6%
if -2.90000000000000015e-288 < a < 7.60000000000000015e-32Initial program 98.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 98.2%
*-commutative98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 56.5%
associate-*r/61.8%
Simplified61.8%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9e+37) (not (<= z 3.15e-71))) (- x (/ z (/ a y))) (- x (/ y (/ (- a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9e+37) || !(z <= 3.15e-71)) {
tmp = x - (z / (a / y));
} else {
tmp = x - (y / (-a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-9d+37)) .or. (.not. (z <= 3.15d-71))) then
tmp = x - (z / (a / y))
else
tmp = x - (y / (-a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9e+37) || !(z <= 3.15e-71)) {
tmp = x - (z / (a / y));
} else {
tmp = x - (y / (-a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9e+37) or not (z <= 3.15e-71): tmp = x - (z / (a / y)) else: tmp = x - (y / (-a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9e+37) || !(z <= 3.15e-71)) tmp = Float64(x - Float64(z / Float64(a / y))); else tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9e+37) || ~((z <= 3.15e-71))) tmp = x - (z / (a / y)); else tmp = x - (y / (-a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9e+37], N[Not[LessEqual[z, 3.15e-71]], $MachinePrecision]], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+37} \lor \neg \left(z \leq 3.15 \cdot 10^{-71}\right):\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\end{array}
\end{array}
if z < -8.99999999999999923e37 or 3.1500000000000002e-71 < z Initial program 90.7%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around inf 82.4%
*-commutative82.4%
associate-/l*88.1%
associate-/r/85.2%
Simplified85.2%
associate-/r/88.1%
Applied egg-rr88.1%
if -8.99999999999999923e37 < z < 3.1500000000000002e-71Initial program 96.9%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in z around 0 90.1%
associate-*r/90.1%
neg-mul-190.1%
Simplified90.1%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.5e+25) (not (<= a 2.4e-32))) (+ x (/ (* t y) a)) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.5e+25) || !(a <= 2.4e-32)) {
tmp = x + ((t * y) / a);
} else {
tmp = (y / a) * (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 <= (-6.5d+25)) .or. (.not. (a <= 2.4d-32))) then
tmp = x + ((t * y) / a)
else
tmp = (y / a) * (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 <= -6.5e+25) || !(a <= 2.4e-32)) {
tmp = x + ((t * y) / a);
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.5e+25) or not (a <= 2.4e-32): tmp = x + ((t * y) / a) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.5e+25) || !(a <= 2.4e-32)) tmp = Float64(x + Float64(Float64(t * y) / a)); else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.5e+25) || ~((a <= 2.4e-32))) tmp = x + ((t * y) / a); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.5e+25], N[Not[LessEqual[a, 2.4e-32]], $MachinePrecision]], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+25} \lor \neg \left(a \leq 2.4 \cdot 10^{-32}\right):\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -6.50000000000000005e25 or 2.4000000000000001e-32 < a Initial program 88.9%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around 0 82.3%
associate-*r/82.3%
neg-mul-182.3%
Simplified82.3%
Taylor expanded in x around 0 79.6%
if -6.50000000000000005e25 < a < 2.4000000000000001e-32Initial program 99.1%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in y around 0 99.1%
*-commutative99.1%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in x around 0 83.5%
mul-1-neg83.5%
associate-*l/82.7%
distribute-rgt-out--68.5%
sub-neg68.5%
+-commutative68.5%
distribute-neg-in68.5%
remove-double-neg68.5%
sub-neg68.5%
distribute-rgt-out--82.7%
Simplified82.7%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.65e+38) (not (<= z 5.6e-85))) (- x (* y (/ z a))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+38) || !(z <= 5.6e-85)) {
tmp = x - (y * (z / a));
} 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.65d+38)) .or. (.not. (z <= 5.6d-85))) then
tmp = x - (y * (z / a))
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.65e+38) || !(z <= 5.6e-85)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.65e+38) or not (z <= 5.6e-85): tmp = x - (y * (z / a)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.65e+38) || !(z <= 5.6e-85)) tmp = Float64(x - Float64(y * Float64(z / a))); 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.65e+38) || ~((z <= 5.6e-85))) tmp = x - (y * (z / a)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+38], N[Not[LessEqual[z, 5.6e-85]], $MachinePrecision]], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+38} \lor \neg \left(z \leq 5.6 \cdot 10^{-85}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.65e38 or 5.60000000000000033e-85 < z Initial program 90.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around inf 82.4%
*-commutative82.4%
associate-/l*88.0%
associate-/r/85.2%
Simplified85.2%
if -1.65e38 < z < 5.60000000000000033e-85Initial program 96.8%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around 0 89.3%
sub-neg89.3%
mul-1-neg89.3%
remove-double-neg89.3%
+-commutative89.3%
associate-/l*91.5%
associate-/r/90.0%
Simplified90.0%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.65e+37) (not (<= z 2.7e-86))) (- x (/ z (/ a y))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+37) || !(z <= 2.7e-86)) {
tmp = x - (z / (a / y));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.65d+37)) .or. (.not. (z <= 2.7d-86))) then
tmp = x - (z / (a / y))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+37) || !(z <= 2.7e-86)) {
tmp = x - (z / (a / y));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.65e+37) or not (z <= 2.7e-86): tmp = x - (z / (a / y)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.65e+37) || !(z <= 2.7e-86)) tmp = Float64(x - Float64(z / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.65e+37) || ~((z <= 2.7e-86))) tmp = x - (z / (a / y)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+37], N[Not[LessEqual[z, 2.7e-86]], $MachinePrecision]], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+37} \lor \neg \left(z \leq 2.7 \cdot 10^{-86}\right):\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.65e37 or 2.69999999999999992e-86 < z Initial program 90.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around inf 82.4%
*-commutative82.4%
associate-/l*88.0%
associate-/r/85.2%
Simplified85.2%
associate-/r/88.0%
Applied egg-rr88.0%
if -1.65e37 < z < 2.69999999999999992e-86Initial program 96.8%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around 0 89.3%
sub-neg89.3%
mul-1-neg89.3%
remove-double-neg89.3%
+-commutative89.3%
associate-/l*91.5%
associate-/r/90.0%
Simplified90.0%
Final simplification88.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.25e+98) x (if (<= a 1.5e+100) (* (/ y a) (- t z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e+98) {
tmp = x;
} else if (a <= 1.5e+100) {
tmp = (y / a) * (t - z);
} 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 (a <= (-1.25d+98)) then
tmp = x
else if (a <= 1.5d+100) then
tmp = (y / a) * (t - z)
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 (a <= -1.25e+98) {
tmp = x;
} else if (a <= 1.5e+100) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.25e+98: tmp = x elif a <= 1.5e+100: tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e+98) tmp = x; elseif (a <= 1.5e+100) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.25e+98) tmp = x; elseif (a <= 1.5e+100) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e+98], x, If[LessEqual[a, 1.5e+100], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+100}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.25e98 or 1.49999999999999993e100 < a Initial program 85.8%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in x around inf 75.4%
if -1.25e98 < a < 1.49999999999999993e100Initial program 98.2%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in y around 0 98.2%
*-commutative98.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in x around 0 75.9%
mul-1-neg75.9%
associate-*l/76.4%
distribute-rgt-out--65.9%
sub-neg65.9%
+-commutative65.9%
distribute-neg-in65.9%
remove-double-neg65.9%
sub-neg65.9%
distribute-rgt-out--76.4%
Simplified76.4%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -6e+25) (+ x (* y (/ t a))) (if (<= a 1.65e-32) (* (/ y a) (- t z)) (+ x (/ (* t y) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e+25) {
tmp = x + (y * (t / a));
} else if (a <= 1.65e-32) {
tmp = (y / a) * (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 <= (-6d+25)) then
tmp = x + (y * (t / a))
else if (a <= 1.65d-32) then
tmp = (y / a) * (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 <= -6e+25) {
tmp = x + (y * (t / a));
} else if (a <= 1.65e-32) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((t * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6e+25: tmp = x + (y * (t / a)) elif a <= 1.65e-32: tmp = (y / a) * (t - z) else: tmp = x + ((t * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6e+25) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (a <= 1.65e-32) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(Float64(t * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6e+25) tmp = x + (y * (t / a)); elseif (a <= 1.65e-32) tmp = (y / a) * (t - z); else tmp = x + ((t * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e+25], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-32], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-32}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\end{array}
\end{array}
if a < -6.00000000000000011e25Initial program 85.9%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in z around 0 78.2%
sub-neg78.2%
mul-1-neg78.2%
remove-double-neg78.2%
+-commutative78.2%
associate-/l*85.8%
associate-/r/85.7%
Simplified85.7%
if -6.00000000000000011e25 < a < 1.65000000000000013e-32Initial program 99.1%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in y around 0 99.1%
*-commutative99.1%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in x around 0 83.5%
mul-1-neg83.5%
associate-*l/82.7%
distribute-rgt-out--68.5%
sub-neg68.5%
+-commutative68.5%
distribute-neg-in68.5%
remove-double-neg68.5%
sub-neg68.5%
distribute-rgt-out--82.7%
Simplified82.7%
if 1.65000000000000013e-32 < a Initial program 91.3%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in z around 0 79.5%
associate-*r/79.5%
neg-mul-179.5%
Simplified79.5%
Taylor expanded in x around 0 80.7%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3e-93) x (if (<= a 5.8e-28) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e-93) {
tmp = x;
} else if (a <= 5.8e-28) {
tmp = t * (y / 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 (a <= (-3d-93)) then
tmp = x
else if (a <= 5.8d-28) then
tmp = t * (y / 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 (a <= -3e-93) {
tmp = x;
} else if (a <= 5.8e-28) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e-93: tmp = x elif a <= 5.8e-28: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e-93) tmp = x; elseif (a <= 5.8e-28) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3e-93) tmp = x; elseif (a <= 5.8e-28) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e-93], x, If[LessEqual[a, 5.8e-28], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-93}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-28}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.0000000000000001e-93 or 5.80000000000000026e-28 < a Initial program 90.9%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in x around inf 59.2%
if -3.0000000000000001e-93 < a < 5.80000000000000026e-28Initial program 98.9%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in y around 0 98.9%
*-commutative98.9%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in t around inf 50.5%
associate-*r/55.8%
Simplified55.8%
Final simplification58.1%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
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 / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 93.6%
associate-*l/98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.6%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in x around inf 43.3%
Final simplification43.3%
(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 2024020
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(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)))