
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x -7.8e-67) (+ (+ x (/ t (* z (* y 3.0)))) (* y (/ 1.0 (* z -3.0)))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.8e-67) {
tmp = (x + (t / (z * (y * 3.0)))) + (y * (1.0 / (z * -3.0)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-7.8d-67)) then
tmp = (x + (t / (z * (y * 3.0d0)))) + (y * (1.0d0 / (z * (-3.0d0))))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.8e-67) {
tmp = (x + (t / (z * (y * 3.0)))) + (y * (1.0 / (z * -3.0)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7.8e-67: tmp = (x + (t / (z * (y * 3.0)))) + (y * (1.0 / (z * -3.0))) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7.8e-67) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y * Float64(1.0 / Float64(z * -3.0)))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7.8e-67) tmp = (x + (t / (z * (y * 3.0)))) + (y * (1.0 / (z * -3.0))); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.8e-67], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(1.0 / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{-67}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + y \cdot \frac{1}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if x < -7.7999999999999997e-67Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
sub-neg97.7%
associate-*l*97.7%
*-commutative97.7%
distribute-frac-neg297.7%
distribute-rgt-neg-in97.7%
metadata-eval97.7%
Simplified97.7%
div-inv97.8%
Applied egg-rr97.8%
if -7.7999999999999997e-67 < x Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
+-commutative94.2%
remove-double-neg94.2%
distribute-frac-neg94.2%
distribute-neg-in94.2%
remove-double-neg94.2%
sub-neg94.2%
neg-mul-194.2%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.4%
*-commutative97.4%
Simplified99.2%
clear-num99.1%
inv-pow99.1%
Applied egg-rr99.1%
unpow-199.1%
Simplified99.1%
associate-*l/99.2%
*-un-lft-identity99.2%
div-inv99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ -0.3333333333333333 z))))
(if (<= y -1.65e+152)
t_1
(if (<= y -1.55e-43)
(+ x (* y (/ 0.3333333333333333 z)))
(if (<= y 1.6e+51) (* t (/ 0.3333333333333333 (* z y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -1.65e+152) {
tmp = t_1;
} else if (y <= -1.55e-43) {
tmp = x + (y * (0.3333333333333333 / z));
} else if (y <= 1.6e+51) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((-0.3333333333333333d0) / z)
if (y <= (-1.65d+152)) then
tmp = t_1
else if (y <= (-1.55d-43)) then
tmp = x + (y * (0.3333333333333333d0 / z))
else if (y <= 1.6d+51) then
tmp = t * (0.3333333333333333d0 / (z * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -1.65e+152) {
tmp = t_1;
} else if (y <= -1.55e-43) {
tmp = x + (y * (0.3333333333333333 / z));
} else if (y <= 1.6e+51) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-0.3333333333333333 / z) tmp = 0 if y <= -1.65e+152: tmp = t_1 elif y <= -1.55e-43: tmp = x + (y * (0.3333333333333333 / z)) elif y <= 1.6e+51: tmp = t * (0.3333333333333333 / (z * y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-0.3333333333333333 / z)) tmp = 0.0 if (y <= -1.65e+152) tmp = t_1; elseif (y <= -1.55e-43) tmp = Float64(x + Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 1.6e+51) tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-0.3333333333333333 / z); tmp = 0.0; if (y <= -1.65e+152) tmp = t_1; elseif (y <= -1.55e-43) tmp = x + (y * (0.3333333333333333 / z)); elseif (y <= 1.6e+51) tmp = t * (0.3333333333333333 / (z * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+152], t$95$1, If[LessEqual[y, -1.55e-43], N[(x + N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+51], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{-43}:\\
\;\;\;\;x + y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6500000000000001e152 or 1.6000000000000001e51 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
+-commutative97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in y around inf 98.7%
Taylor expanded in x around 0 78.4%
if -1.6500000000000001e152 < y < -1.55e-43Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 86.1%
neg-mul-186.2%
Simplified86.1%
neg-sub086.1%
sub-neg86.1%
add-sqr-sqrt86.0%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod0.0%
add-sqr-sqrt62.3%
Applied egg-rr62.3%
+-lft-identity62.3%
Simplified62.3%
if -1.55e-43 < y < 1.6000000000000001e51Initial program 92.4%
sub-neg92.4%
associate-+l+92.4%
+-commutative92.4%
remove-double-neg92.4%
distribute-frac-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
sub-neg92.4%
neg-mul-192.4%
times-frac91.5%
distribute-frac-neg91.5%
neg-mul-191.5%
*-commutative91.5%
associate-/l*91.5%
*-commutative91.5%
Simplified92.3%
Taylor expanded in y around 0 88.0%
Taylor expanded in t around inf 64.0%
associate-*r/63.9%
*-commutative63.9%
associate-*r/64.0%
Simplified64.0%
associate-/l*61.7%
associate-/l/61.7%
Applied egg-rr61.7%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ -0.3333333333333333 z))))
(if (<= y -1.65e+152)
t_1
(if (<= y -1.35e-43)
x
(if (<= y 1.7e+51) (* t (/ 0.3333333333333333 (* z y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -1.65e+152) {
tmp = t_1;
} else if (y <= -1.35e-43) {
tmp = x;
} else if (y <= 1.7e+51) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((-0.3333333333333333d0) / z)
if (y <= (-1.65d+152)) then
tmp = t_1
else if (y <= (-1.35d-43)) then
tmp = x
else if (y <= 1.7d+51) then
tmp = t * (0.3333333333333333d0 / (z * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -1.65e+152) {
tmp = t_1;
} else if (y <= -1.35e-43) {
tmp = x;
} else if (y <= 1.7e+51) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-0.3333333333333333 / z) tmp = 0 if y <= -1.65e+152: tmp = t_1 elif y <= -1.35e-43: tmp = x elif y <= 1.7e+51: tmp = t * (0.3333333333333333 / (z * y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-0.3333333333333333 / z)) tmp = 0.0 if (y <= -1.65e+152) tmp = t_1; elseif (y <= -1.35e-43) tmp = x; elseif (y <= 1.7e+51) tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-0.3333333333333333 / z); tmp = 0.0; if (y <= -1.65e+152) tmp = t_1; elseif (y <= -1.35e-43) tmp = x; elseif (y <= 1.7e+51) tmp = t * (0.3333333333333333 / (z * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+152], t$95$1, If[LessEqual[y, -1.35e-43], x, If[LessEqual[y, 1.7e+51], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6500000000000001e152 or 1.69999999999999992e51 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
+-commutative97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in y around inf 98.7%
Taylor expanded in x around 0 78.4%
if -1.6500000000000001e152 < y < -1.34999999999999996e-43Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in x around inf 62.2%
if -1.34999999999999996e-43 < y < 1.69999999999999992e51Initial program 92.4%
sub-neg92.4%
associate-+l+92.4%
+-commutative92.4%
remove-double-neg92.4%
distribute-frac-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
sub-neg92.4%
neg-mul-192.4%
times-frac91.5%
distribute-frac-neg91.5%
neg-mul-191.5%
*-commutative91.5%
associate-/l*91.5%
*-commutative91.5%
Simplified92.3%
Taylor expanded in y around 0 88.0%
Taylor expanded in t around inf 64.0%
associate-*r/63.9%
*-commutative63.9%
associate-*r/64.0%
Simplified64.0%
associate-/l*61.7%
associate-/l/61.7%
Applied egg-rr61.7%
Final simplification67.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ -0.3333333333333333 z))))
(if (<= y -1.65e+152)
t_1
(if (<= y -4.3e-42)
x
(if (<= y 1.46e+51) (* 0.3333333333333333 (/ (/ t y) z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -1.65e+152) {
tmp = t_1;
} else if (y <= -4.3e-42) {
tmp = x;
} else if (y <= 1.46e+51) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((-0.3333333333333333d0) / z)
if (y <= (-1.65d+152)) then
tmp = t_1
else if (y <= (-4.3d-42)) then
tmp = x
else if (y <= 1.46d+51) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -1.65e+152) {
tmp = t_1;
} else if (y <= -4.3e-42) {
tmp = x;
} else if (y <= 1.46e+51) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-0.3333333333333333 / z) tmp = 0 if y <= -1.65e+152: tmp = t_1 elif y <= -4.3e-42: tmp = x elif y <= 1.46e+51: tmp = 0.3333333333333333 * ((t / y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-0.3333333333333333 / z)) tmp = 0.0 if (y <= -1.65e+152) tmp = t_1; elseif (y <= -4.3e-42) tmp = x; elseif (y <= 1.46e+51) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-0.3333333333333333 / z); tmp = 0.0; if (y <= -1.65e+152) tmp = t_1; elseif (y <= -4.3e-42) tmp = x; elseif (y <= 1.46e+51) tmp = 0.3333333333333333 * ((t / y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+152], t$95$1, If[LessEqual[y, -4.3e-42], x, If[LessEqual[y, 1.46e+51], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{-42}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.46 \cdot 10^{+51}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6500000000000001e152 or 1.4600000000000001e51 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
+-commutative97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in y around inf 98.7%
Taylor expanded in x around 0 78.4%
if -1.6500000000000001e152 < y < -4.3000000000000001e-42Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in x around inf 62.2%
if -4.3000000000000001e-42 < y < 1.4600000000000001e51Initial program 92.4%
sub-neg92.4%
associate-+l+92.4%
+-commutative92.4%
remove-double-neg92.4%
distribute-frac-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
sub-neg92.4%
neg-mul-192.4%
times-frac91.5%
distribute-frac-neg91.5%
neg-mul-191.5%
*-commutative91.5%
associate-/l*91.5%
*-commutative91.5%
Simplified92.3%
Taylor expanded in y around 0 88.0%
Taylor expanded in t around inf 64.0%
associate-*r/63.9%
*-commutative63.9%
associate-*r/64.0%
Simplified64.0%
clear-num64.0%
*-un-lft-identity64.0%
*-commutative64.0%
times-frac59.5%
clear-num59.5%
associate-/r/58.8%
clear-num58.8%
div-inv58.8%
clear-num58.8%
associate-/l*58.8%
Applied egg-rr58.8%
(FPCore (x y z t) :precision binary64 (if (<= x -5e-67) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5e-67) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-5d-67)) then
tmp = (x + (t / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5e-67) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5e-67: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5e-67) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -5e-67) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5e-67], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-67}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if x < -4.9999999999999999e-67Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
sub-neg97.7%
associate-*l*97.7%
*-commutative97.7%
distribute-frac-neg297.7%
distribute-rgt-neg-in97.7%
metadata-eval97.7%
Simplified97.7%
if -4.9999999999999999e-67 < x Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
+-commutative94.2%
remove-double-neg94.2%
distribute-frac-neg94.2%
distribute-neg-in94.2%
remove-double-neg94.2%
sub-neg94.2%
neg-mul-194.2%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.4%
*-commutative97.4%
Simplified99.2%
clear-num99.1%
inv-pow99.1%
Applied egg-rr99.1%
unpow-199.1%
Simplified99.1%
associate-*l/99.2%
*-un-lft-identity99.2%
div-inv99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.5e-14) (not (<= y 1.25e+52))) (- x (/ y (* z 3.0))) (+ x (/ t (* z (* y 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-14) || !(y <= 1.25e+52)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (t / (z * (y * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.5d-14)) .or. (.not. (y <= 1.25d+52))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (t / (z * (y * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-14) || !(y <= 1.25e+52)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (t / (z * (y * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.5e-14) or not (y <= 1.25e+52): tmp = x - (y / (z * 3.0)) else: tmp = x + (t / (z * (y * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.5e-14) || !(y <= 1.25e+52)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.5e-14) || ~((y <= 1.25e+52))) tmp = x - (y / (z * 3.0)); else tmp = x + (t / (z * (y * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.5e-14], N[Not[LessEqual[y, 1.25e+52]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-14} \lor \neg \left(y \leq 1.25 \cdot 10^{+52}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\end{array}
\end{array}
if y < -4.4999999999999998e-14 or 1.25e52 < y Initial program 98.2%
sub-neg98.2%
associate-+l+98.2%
+-commutative98.2%
remove-double-neg98.2%
distribute-frac-neg98.2%
distribute-neg-in98.2%
remove-double-neg98.2%
sub-neg98.2%
neg-mul-198.2%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.1%
*-commutative98.1%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 96.7%
neg-mul-196.7%
Simplified96.7%
if -4.4999999999999998e-14 < y < 1.25e52Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
associate-/l*92.0%
*-commutative92.0%
Simplified92.7%
clear-num92.7%
inv-pow92.7%
Applied egg-rr92.7%
unpow-192.7%
Simplified92.7%
associate-*l/92.7%
*-un-lft-identity92.7%
div-inv92.7%
metadata-eval92.7%
Applied egg-rr92.7%
Taylor expanded in t around inf 86.5%
associate-*r/86.5%
times-frac91.4%
associate-*l/91.3%
*-commutative91.3%
metadata-eval91.3%
times-frac91.3%
*-rgt-identity91.3%
associate-/l/86.6%
*-commutative86.6%
associate-*l*86.6%
*-commutative86.6%
Simplified86.6%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.25e-14) (not (<= y 1.85e+51))) (- x (/ y (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-14) || !(y <= 1.85e+51)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.25d-14)) .or. (.not. (y <= 1.85d+51))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-14) || !(y <= 1.85e+51)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.25e-14) or not (y <= 1.85e+51): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.25e-14) || !(y <= 1.85e+51)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.25e-14) || ~((y <= 1.85e+51))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.25e-14], N[Not[LessEqual[y, 1.85e+51]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-14} \lor \neg \left(y \leq 1.85 \cdot 10^{+51}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.25e-14 or 1.8500000000000001e51 < y Initial program 98.2%
sub-neg98.2%
associate-+l+98.2%
+-commutative98.2%
remove-double-neg98.2%
distribute-frac-neg98.2%
distribute-neg-in98.2%
remove-double-neg98.2%
sub-neg98.2%
neg-mul-198.2%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.1%
*-commutative98.1%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 96.7%
neg-mul-196.7%
Simplified96.7%
if -1.25e-14 < y < 1.8500000000000001e51Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
associate-/l*92.0%
*-commutative92.0%
Simplified92.7%
Taylor expanded in t around inf 86.5%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.5e-62) (not (<= y 2.55e-259))) (- x (/ y (* z 3.0))) (/ (* 0.3333333333333333 (/ t z)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.5e-62) || !(y <= 2.55e-259)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 * (t / z)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.5d-62)) .or. (.not. (y <= 2.55d-259))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (0.3333333333333333d0 * (t / z)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.5e-62) || !(y <= 2.55e-259)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 * (t / z)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.5e-62) or not (y <= 2.55e-259): tmp = x - (y / (z * 3.0)) else: tmp = (0.3333333333333333 * (t / z)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.5e-62) || !(y <= 2.55e-259)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.5e-62) || ~((y <= 2.55e-259))) tmp = x - (y / (z * 3.0)); else tmp = (0.3333333333333333 * (t / z)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.5e-62], N[Not[LessEqual[y, 2.55e-259]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-62} \lor \neg \left(y \leq 2.55 \cdot 10^{-259}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.5000000000000001e-62 or 2.5499999999999999e-259 < y Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
*-commutative96.3%
Simplified97.8%
clear-num97.8%
inv-pow97.8%
Applied egg-rr97.8%
unpow-197.8%
Simplified97.8%
associate-*l/97.9%
*-un-lft-identity97.9%
div-inv97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Taylor expanded in t around 0 82.8%
neg-mul-182.8%
Simplified82.8%
if -1.5000000000000001e-62 < y < 2.5499999999999999e-259Initial program 89.9%
sub-neg89.9%
associate-+l+89.9%
+-commutative89.9%
remove-double-neg89.9%
distribute-frac-neg89.9%
distribute-neg-in89.9%
remove-double-neg89.9%
sub-neg89.9%
neg-mul-189.9%
times-frac91.0%
distribute-frac-neg91.0%
neg-mul-191.0%
*-commutative91.0%
associate-/l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y around 0 94.9%
Taylor expanded in t around inf 83.0%
Final simplification82.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.1e-62) (not (<= y 2.55e-259))) (- x (* 0.3333333333333333 (/ y z))) (/ (* 0.3333333333333333 (/ t z)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-62) || !(y <= 2.55e-259)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = (0.3333333333333333 * (t / z)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.1d-62)) .or. (.not. (y <= 2.55d-259))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = (0.3333333333333333d0 * (t / z)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-62) || !(y <= 2.55e-259)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = (0.3333333333333333 * (t / z)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.1e-62) or not (y <= 2.55e-259): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = (0.3333333333333333 * (t / z)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.1e-62) || !(y <= 2.55e-259)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.1e-62) || ~((y <= 2.55e-259))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = (0.3333333333333333 * (t / z)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.1e-62], N[Not[LessEqual[y, 2.55e-259]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-62} \lor \neg \left(y \leq 2.55 \cdot 10^{-259}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -2.0999999999999999e-62 or 2.5499999999999999e-259 < y Initial program 97.3%
Taylor expanded in t around 0 82.8%
if -2.0999999999999999e-62 < y < 2.5499999999999999e-259Initial program 89.9%
sub-neg89.9%
associate-+l+89.9%
+-commutative89.9%
remove-double-neg89.9%
distribute-frac-neg89.9%
distribute-neg-in89.9%
remove-double-neg89.9%
sub-neg89.9%
neg-mul-189.9%
times-frac91.0%
distribute-frac-neg91.0%
neg-mul-191.0%
*-commutative91.0%
associate-/l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y around 0 94.9%
Taylor expanded in t around inf 83.0%
Final simplification82.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.45e-62) (not (<= y 1.85e-79))) (- x (* 0.3333333333333333 (/ y z))) (* t (/ 0.3333333333333333 (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.45e-62) || !(y <= 1.85e-79)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.45d-62)) .or. (.not. (y <= 1.85d-79))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = t * (0.3333333333333333d0 / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.45e-62) || !(y <= 1.85e-79)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.45e-62) or not (y <= 1.85e-79): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = t * (0.3333333333333333 / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.45e-62) || !(y <= 1.85e-79)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.45e-62) || ~((y <= 1.85e-79))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = t * (0.3333333333333333 / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.45e-62], N[Not[LessEqual[y, 1.85e-79]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-62} \lor \neg \left(y \leq 1.85 \cdot 10^{-79}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.44999999999999993e-62 or 1.85000000000000009e-79 < y Initial program 98.0%
Taylor expanded in t around 0 88.6%
if -1.44999999999999993e-62 < y < 1.85000000000000009e-79Initial program 91.0%
sub-neg91.0%
associate-+l+91.0%
+-commutative91.0%
remove-double-neg91.0%
distribute-frac-neg91.0%
distribute-neg-in91.0%
remove-double-neg91.0%
sub-neg91.0%
neg-mul-191.0%
times-frac89.8%
distribute-frac-neg89.8%
neg-mul-189.8%
*-commutative89.8%
associate-/l*89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in y around 0 92.7%
Taylor expanded in t around inf 72.0%
associate-*r/71.9%
*-commutative71.9%
associate-*r/72.0%
Simplified72.0%
associate-/l*68.9%
associate-/l/68.9%
Applied egg-rr68.9%
Final simplification81.4%
(FPCore (x y z t) :precision binary64 (if (<= x -7.5e+38) x (if (<= x 1.22e+70) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.5e+38) {
tmp = x;
} else if (x <= 1.22e+70) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-7.5d+38)) then
tmp = x
else if (x <= 1.22d+70) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.5e+38) {
tmp = x;
} else if (x <= 1.22e+70) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7.5e+38: tmp = x elif x <= 1.22e+70: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7.5e+38) tmp = x; elseif (x <= 1.22e+70) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7.5e+38) tmp = x; elseif (x <= 1.22e+70) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.5e+38], x, If[LessEqual[x, 1.22e+70], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.22 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.4999999999999999e38 or 1.22e70 < x Initial program 95.0%
sub-neg95.0%
associate-+l+95.0%
+-commutative95.0%
remove-double-neg95.0%
distribute-frac-neg95.0%
distribute-neg-in95.0%
remove-double-neg95.0%
sub-neg95.0%
neg-mul-195.0%
times-frac94.1%
distribute-frac-neg94.1%
neg-mul-194.1%
*-commutative94.1%
associate-/l*94.1%
*-commutative94.1%
Simplified94.0%
Taylor expanded in x around inf 61.3%
if -7.4999999999999999e38 < x < 1.22e70Initial program 95.7%
sub-neg95.7%
associate-+l+95.7%
+-commutative95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac95.6%
distribute-frac-neg95.6%
neg-mul-195.6%
*-commutative95.6%
associate-/l*95.5%
*-commutative95.5%
Simplified97.4%
Taylor expanded in y around inf 62.3%
Taylor expanded in x around 0 51.0%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac95.0%
distribute-frac-neg95.0%
neg-mul-195.0%
*-commutative95.0%
associate-/l*95.0%
*-commutative95.0%
Simplified96.1%
clear-num96.1%
inv-pow96.1%
Applied egg-rr96.1%
unpow-196.1%
Simplified96.1%
associate-*l/96.1%
*-un-lft-identity96.1%
div-inv96.2%
metadata-eval96.2%
Applied egg-rr96.2%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac95.0%
distribute-frac-neg95.0%
neg-mul-195.0%
*-commutative95.0%
associate-/l*95.0%
*-commutative95.0%
Simplified96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac95.0%
distribute-frac-neg95.0%
neg-mul-195.0%
*-commutative95.0%
associate-/l*95.0%
*-commutative95.0%
Simplified96.1%
Taylor expanded in x around inf 31.6%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024116
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))