
(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 22 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 (<= (* z 3.0) -500000000.0) (+ (/ t (* (* z 3.0) y)) (- x (/ y (* z 3.0)))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -500000000.0) {
tmp = (t / ((z * 3.0) * y)) + (x - (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 ((z * 3.0d0) <= (-500000000.0d0)) then
tmp = (t / ((z * 3.0d0) * y)) + (x - (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 ((z * 3.0) <= -500000000.0) {
tmp = (t / ((z * 3.0) * y)) + (x - (y / (z * 3.0)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -500000000.0: tmp = (t / ((z * 3.0) * y)) + (x - (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 (Float64(z * 3.0) <= -500000000.0) tmp = Float64(Float64(t / Float64(Float64(z * 3.0) * y)) + Float64(x - 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 ((z * 3.0) <= -500000000.0) tmp = (t / ((z * 3.0) * y)) + (x - (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[N[(z * 3.0), $MachinePrecision], -500000000.0], N[(N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] + N[(x - N[(y / 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}\;z \cdot 3 \leq -500000000:\\
\;\;\;\;\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x - \frac{y}{z \cdot 3}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -5e8Initial program 98.2%
if -5e8 < (*.f64 z #s(literal 3 binary64)) Initial program 91.8%
+-commutative91.8%
associate-+r-91.8%
+-commutative91.8%
associate--l+91.8%
sub-neg91.8%
remove-double-neg91.8%
distribute-frac-neg91.8%
distribute-neg-in91.8%
remove-double-neg91.8%
sub-neg91.8%
neg-mul-191.8%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified98.3%
metadata-eval98.3%
associate-/r*98.3%
*-commutative98.3%
associate-*l/98.4%
*-un-lft-identity98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -500000000.0) (+ (+ x (/ t (* z (* 3.0 y)))) (/ y (* z -3.0))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -500000000.0) {
tmp = (x + (t / (z * (3.0 * y)))) + (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 ((z * 3.0d0) <= (-500000000.0d0)) then
tmp = (x + (t / (z * (3.0d0 * y)))) + (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 ((z * 3.0) <= -500000000.0) {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -500000000.0: tmp = (x + (t / (z * (3.0 * y)))) + (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 (Float64(z * 3.0) <= -500000000.0) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))) + 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 ((z * 3.0) <= -500000000.0) tmp = (x + (t / (z * (3.0 * y)))) + (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[N[(z * 3.0), $MachinePrecision], -500000000.0], N[(N[(x + N[(t / N[(z * N[(3.0 * y), $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}\;z \cdot 3 \leq -500000000:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -5e8Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
sub-neg98.2%
associate-*l*98.2%
*-commutative98.2%
distribute-frac-neg298.2%
distribute-rgt-neg-in98.2%
metadata-eval98.2%
Simplified98.2%
if -5e8 < (*.f64 z #s(literal 3 binary64)) Initial program 91.8%
+-commutative91.8%
associate-+r-91.8%
+-commutative91.8%
associate--l+91.8%
sub-neg91.8%
remove-double-neg91.8%
distribute-frac-neg91.8%
distribute-neg-in91.8%
remove-double-neg91.8%
sub-neg91.8%
neg-mul-191.8%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified98.3%
metadata-eval98.3%
associate-/r*98.3%
*-commutative98.3%
associate-*l/98.4%
*-un-lft-identity98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1050000000.0) (not (<= y 900000000000.0))) (- x (/ y (* z 3.0))) (+ x (/ (* t (/ 0.3333333333333333 z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1050000000.0) || !(y <= 900000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((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 <= (-1050000000.0d0)) .or. (.not. (y <= 900000000000.0d0))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((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 <= -1050000000.0) || !(y <= 900000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1050000000.0) or not (y <= 900000000000.0): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t * (0.3333333333333333 / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1050000000.0) || !(y <= 900000000000.0)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1050000000.0) || ~((y <= 900000000000.0))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t * (0.3333333333333333 / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1050000000.0], N[Not[LessEqual[y, 900000000000.0]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1050000000 \lor \neg \left(y \leq 900000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.05e9 or 9e11 < y Initial program 98.1%
+-commutative98.1%
associate-+r-98.1%
+-commutative98.1%
associate--l+98.1%
sub-neg98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
metadata-eval99.6%
associate-/r*99.6%
*-commutative99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 94.0%
neg-mul-194.0%
Simplified94.0%
if -1.05e9 < y < 9e11Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
+-commutative89.3%
associate--l+89.3%
sub-neg89.3%
remove-double-neg89.3%
distribute-frac-neg89.3%
distribute-neg-in89.3%
remove-double-neg89.3%
sub-neg89.3%
neg-mul-189.3%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 89.9%
*-commutative89.9%
associate-*l/92.8%
Applied egg-rr92.8%
Final simplification93.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -850.0) (not (<= y 410000000.0))) (- x (/ y (* z 3.0))) (+ x (/ 0.3333333333333333 (* z (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -850.0) || !(y <= 410000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (z * (y / t)));
}
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 <= (-850.0d0)) .or. (.not. (y <= 410000000.0d0))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 / (z * (y / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -850.0) || !(y <= 410000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (z * (y / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -850.0) or not (y <= 410000000.0): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 / (z * (y / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -850.0) || !(y <= 410000000.0)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(z * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -850.0) || ~((y <= 410000000.0))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 / (z * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -850.0], N[Not[LessEqual[y, 410000000.0]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -850 \lor \neg \left(y \leq 410000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -850 or 4.1e8 < y Initial program 98.1%
+-commutative98.1%
associate-+r-98.1%
+-commutative98.1%
associate--l+98.1%
sub-neg98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
metadata-eval99.6%
associate-/r*99.6%
*-commutative99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 94.0%
neg-mul-194.0%
Simplified94.0%
if -850 < y < 4.1e8Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
+-commutative89.3%
associate--l+89.3%
sub-neg89.3%
remove-double-neg89.3%
distribute-frac-neg89.3%
distribute-neg-in89.3%
remove-double-neg89.3%
sub-neg89.3%
neg-mul-189.3%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 89.9%
*-commutative89.9%
clear-num89.8%
frac-times91.4%
metadata-eval91.4%
Applied egg-rr91.4%
Final simplification92.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -28.0) (not (<= y 42000000.0))) (- x (/ y (* z 3.0))) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -28.0) || !(y <= 42000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
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 <= (-28.0d0)) .or. (.not. (y <= 42000000.0d0))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -28.0) || !(y <= 42000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -28.0) or not (y <= 42000000.0): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -28.0) || !(y <= 42000000.0)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -28.0) || ~((y <= 42000000.0))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -28.0], N[Not[LessEqual[y, 42000000.0]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -28 \lor \neg \left(y \leq 42000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -28 or 4.2e7 < y Initial program 98.1%
+-commutative98.1%
associate-+r-98.1%
+-commutative98.1%
associate--l+98.1%
sub-neg98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
metadata-eval99.6%
associate-/r*99.6%
*-commutative99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 94.0%
neg-mul-194.0%
Simplified94.0%
if -28 < y < 4.2e7Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
+-commutative89.3%
associate--l+89.3%
sub-neg89.3%
remove-double-neg89.3%
distribute-frac-neg89.3%
distribute-neg-in89.3%
remove-double-neg89.3%
sub-neg89.3%
neg-mul-189.3%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 89.9%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -240000000000.0) (not (<= y 14500000000000.0))) (- 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 <= -240000000000.0) || !(y <= 14500000000000.0)) {
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 <= (-240000000000.0d0)) .or. (.not. (y <= 14500000000000.0d0))) 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 <= -240000000000.0) || !(y <= 14500000000000.0)) {
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 <= -240000000000.0) or not (y <= 14500000000000.0): 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 <= -240000000000.0) || !(y <= 14500000000000.0)) 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 <= -240000000000.0) || ~((y <= 14500000000000.0))) 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, -240000000000.0], N[Not[LessEqual[y, 14500000000000.0]], $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 -240000000000 \lor \neg \left(y \leq 14500000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.4e11 or 1.45e13 < y Initial program 98.1%
+-commutative98.1%
associate-+r-98.1%
+-commutative98.1%
associate--l+98.1%
sub-neg98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
metadata-eval99.6%
associate-/r*99.6%
*-commutative99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 94.0%
neg-mul-194.0%
Simplified94.0%
if -2.4e11 < y < 1.45e13Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
+-commutative89.3%
associate--l+89.3%
sub-neg89.3%
remove-double-neg89.3%
distribute-frac-neg89.3%
distribute-neg-in89.3%
remove-double-neg89.3%
sub-neg89.3%
neg-mul-189.3%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 85.2%
Final simplification89.1%
(FPCore (x y z t)
:precision binary64
(if (<= x -6.5e+169)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= x 8.2e+66)
(* (- (/ t y) y) (/ 0.3333333333333333 z))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6.5e+169) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (x <= 8.2e+66) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else {
tmp = x - (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 <= (-6.5d+169)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (x <= 8.2d+66) then
tmp = ((t / y) - y) * (0.3333333333333333d0 / z)
else
tmp = x - (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 <= -6.5e+169) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (x <= 8.2e+66) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -6.5e+169: tmp = x + ((y * -0.3333333333333333) / z) elif x <= 8.2e+66: tmp = ((t / y) - y) * (0.3333333333333333 / z) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -6.5e+169) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (x <= 8.2e+66) tmp = Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -6.5e+169) tmp = x + ((y * -0.3333333333333333) / z); elseif (x <= 8.2e+66) tmp = ((t / y) - y) * (0.3333333333333333 / z); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -6.5e+169], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e+66], N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+169}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+66}:\\
\;\;\;\;\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if x < -6.4999999999999995e169Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
+-commutative93.1%
associate--l+93.1%
sub-neg93.1%
remove-double-neg93.1%
distribute-frac-neg93.1%
distribute-neg-in93.1%
remove-double-neg93.1%
sub-neg93.1%
neg-mul-193.1%
times-frac93.2%
distribute-frac-neg93.2%
neg-mul-193.2%
*-commutative93.2%
associate-/l*93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in t around 0 89.4%
*-commutative89.4%
associate-*l/89.5%
Simplified89.5%
if -6.4999999999999995e169 < x < 8.19999999999999989e66Initial program 92.6%
+-commutative92.6%
associate-+r-92.6%
sub-neg92.6%
associate-*l*92.7%
*-commutative92.7%
distribute-frac-neg292.7%
distribute-rgt-neg-in92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in z around 0 84.8%
*-un-lft-identity84.8%
*-commutative84.8%
*-commutative84.8%
fma-define84.8%
clear-num84.8%
un-div-inv84.9%
Applied egg-rr84.9%
*-rgt-identity84.9%
fma-undefine84.9%
+-commutative84.9%
associate-/r/84.8%
metadata-eval84.8%
associate-*r/84.8%
associate-*r/84.8%
metadata-eval84.8%
associate-*l/84.8%
associate-*r/84.8%
*-commutative84.8%
metadata-eval84.8%
distribute-lft-neg-in84.8%
distribute-rgt-neg-in84.8%
distribute-lft-in84.8%
sub-neg84.8%
Simplified84.8%
Taylor expanded in t around 0 80.8%
*-commutative80.8%
*-lft-identity80.8%
associate-*l/80.8%
associate-*r*80.8%
*-commutative80.8%
associate-/r*84.8%
associate-*r/84.8%
*-lft-identity84.8%
associate-*l/84.8%
distribute-lft-in84.8%
+-commutative84.8%
metadata-eval84.8%
distribute-lft-neg-in84.8%
distribute-rgt-neg-out84.8%
distribute-lft-out84.8%
sub-neg84.8%
associate-*r*84.8%
associate-*l/84.9%
metadata-eval84.9%
Simplified84.9%
if 8.19999999999999989e66 < x Initial program 95.5%
+-commutative95.5%
associate-+r-95.5%
+-commutative95.5%
associate--l+95.5%
sub-neg95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.8%
*-commutative97.8%
Simplified97.7%
metadata-eval97.7%
associate-/r*97.8%
*-commutative97.8%
associate-*l/97.9%
*-un-lft-identity97.9%
Applied egg-rr97.9%
Taylor expanded in t around 0 80.2%
neg-mul-180.2%
Simplified80.2%
Final simplification84.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.4e-152) (not (<= y 2000000.0))) (- x (/ y (* z 3.0))) (/ (* 0.3333333333333333 (/ t z)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-152) || !(y <= 2000000.0)) {
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 <= (-3.4d-152)) .or. (.not. (y <= 2000000.0d0))) 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 <= -3.4e-152) || !(y <= 2000000.0)) {
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 <= -3.4e-152) or not (y <= 2000000.0): 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 <= -3.4e-152) || !(y <= 2000000.0)) 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 <= -3.4e-152) || ~((y <= 2000000.0))) 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, -3.4e-152], N[Not[LessEqual[y, 2000000.0]], $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 -3.4 \cdot 10^{-152} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -3.39999999999999984e-152 or 2e6 < y Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.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-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
metadata-eval99.6%
associate-/r*99.6%
*-commutative99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 86.7%
neg-mul-186.7%
Simplified86.7%
if -3.39999999999999984e-152 < y < 2e6Initial program 87.8%
+-commutative87.8%
associate-+r-87.8%
sub-neg87.8%
associate-*l*87.8%
*-commutative87.8%
distribute-frac-neg287.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in z around 0 69.3%
Taylor expanded in y around 0 66.0%
associate-*r/66.0%
Simplified66.0%
div-inv65.9%
associate-/l*66.0%
associate-*l*66.0%
metadata-eval66.0%
div-inv66.1%
times-frac66.2%
*-un-lft-identity66.2%
associate-/l/66.2%
div-inv66.1%
metadata-eval66.1%
associate-/l/62.8%
Applied egg-rr62.8%
associate-/r*69.8%
associate-*l/69.9%
Applied egg-rr69.9%
Final simplification79.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.1e-152) (not (<= y 2000000.0))) (+ x (* -0.3333333333333333 (/ y z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.1e-152) || !(y <= 2000000.0)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (t / z) * (0.3333333333333333 / 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 <= (-3.1d-152)) .or. (.not. (y <= 2000000.0d0))) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.1e-152) || !(y <= 2000000.0)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.1e-152) or not (y <= 2000000.0): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.1e-152) || !(y <= 2000000.0)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.1e-152) || ~((y <= 2000000.0))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.1e-152], N[Not[LessEqual[y, 2000000.0]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-152} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -3.0999999999999998e-152 or 2e6 < y Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.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-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
Taylor expanded in t around 0 86.5%
if -3.0999999999999998e-152 < y < 2e6Initial program 87.8%
+-commutative87.8%
associate-+r-87.8%
sub-neg87.8%
associate-*l*87.8%
*-commutative87.8%
distribute-frac-neg287.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in z around 0 69.3%
Taylor expanded in y around 0 66.0%
associate-*r/66.0%
Simplified66.0%
associate-/l/62.9%
*-commutative62.9%
times-frac69.8%
Applied egg-rr69.8%
Final simplification78.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.4e-152)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 2000000.0)
(/ (* 0.3333333333333333 (/ t z)) y)
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-152) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 2000000.0) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
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 <= (-3.4d-152)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 2000000.0d0) then
tmp = (0.3333333333333333d0 * (t / z)) / y
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-152) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 2000000.0) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.4e-152: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 2000000.0: tmp = (0.3333333333333333 * (t / z)) / y else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.4e-152) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 2000000.0) tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.4e-152) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 2000000.0) tmp = (0.3333333333333333 * (t / z)) / y; else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.4e-152], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2000000.0], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-152}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2000000:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.39999999999999984e-152Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
+-commutative96.5%
associate--l+96.5%
sub-neg96.5%
remove-double-neg96.5%
distribute-frac-neg96.5%
distribute-neg-in96.5%
remove-double-neg96.5%
sub-neg96.5%
neg-mul-196.5%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 80.5%
if -3.39999999999999984e-152 < y < 2e6Initial program 87.8%
+-commutative87.8%
associate-+r-87.8%
sub-neg87.8%
associate-*l*87.8%
*-commutative87.8%
distribute-frac-neg287.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in z around 0 69.3%
Taylor expanded in y around 0 66.0%
associate-*r/66.0%
Simplified66.0%
div-inv65.9%
associate-/l*66.0%
associate-*l*66.0%
metadata-eval66.0%
div-inv66.1%
times-frac66.2%
*-un-lft-identity66.2%
associate-/l/66.2%
div-inv66.1%
metadata-eval66.1%
associate-/l/62.8%
Applied egg-rr62.8%
associate-/r*69.8%
associate-*l/69.9%
Applied egg-rr69.9%
if 2e6 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 97.0%
*-commutative97.0%
associate-*l/97.2%
Simplified97.2%
Final simplification79.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.4e-152)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 12500000000.0)
(* (/ t z) (/ 0.3333333333333333 y))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-152) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 12500000000.0) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
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 <= (-3.4d-152)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 12500000000.0d0) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-152) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 12500000000.0) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.4e-152: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 12500000000.0: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.4e-152) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 12500000000.0) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.4e-152) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 12500000000.0) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.4e-152], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 12500000000.0], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-152}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 12500000000:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.39999999999999984e-152Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
+-commutative96.5%
associate--l+96.5%
sub-neg96.5%
remove-double-neg96.5%
distribute-frac-neg96.5%
distribute-neg-in96.5%
remove-double-neg96.5%
sub-neg96.5%
neg-mul-196.5%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 80.5%
if -3.39999999999999984e-152 < y < 1.25e10Initial program 87.8%
+-commutative87.8%
associate-+r-87.8%
sub-neg87.8%
associate-*l*87.8%
*-commutative87.8%
distribute-frac-neg287.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in z around 0 69.3%
Taylor expanded in y around 0 66.0%
associate-*r/66.0%
Simplified66.0%
associate-/l/62.9%
*-commutative62.9%
times-frac69.8%
Applied egg-rr69.8%
if 1.25e10 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 97.0%
*-commutative97.0%
associate-*l/97.2%
Simplified97.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.4e-152)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 2000000.0)
(* (/ t z) (/ 0.3333333333333333 y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-152) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 2000000.0) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
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 <= (-3.4d-152)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 2000000.0d0) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-152) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 2000000.0) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.4e-152: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 2000000.0: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.4e-152) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 2000000.0) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.4e-152) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 2000000.0) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.4e-152], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2000000.0], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-152}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2000000:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.39999999999999984e-152Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
+-commutative96.5%
associate--l+96.5%
sub-neg96.5%
remove-double-neg96.5%
distribute-frac-neg96.5%
distribute-neg-in96.5%
remove-double-neg96.5%
sub-neg96.5%
neg-mul-196.5%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 80.5%
if -3.39999999999999984e-152 < y < 2e6Initial program 87.8%
+-commutative87.8%
associate-+r-87.8%
sub-neg87.8%
associate-*l*87.8%
*-commutative87.8%
distribute-frac-neg287.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in z around 0 69.3%
Taylor expanded in y around 0 66.0%
associate-*r/66.0%
Simplified66.0%
associate-/l/62.9%
*-commutative62.9%
times-frac69.8%
Applied egg-rr69.8%
if 2e6 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 97.0%
metadata-eval97.0%
distribute-lft-neg-in97.0%
associate-*r/97.2%
associate-*l/97.0%
*-commutative97.0%
distribute-rgt-neg-in97.0%
distribute-neg-frac97.0%
metadata-eval97.0%
Simplified97.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.3e+16)
(* -0.3333333333333333 (* y (/ 1.0 z)))
(if (<= y 460000000.0)
(* (/ t z) (/ 0.3333333333333333 y))
(/ (* y -0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e+16) {
tmp = -0.3333333333333333 * (y * (1.0 / z));
} else if (y <= 460000000.0) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = (y * -0.3333333333333333) / z;
}
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.3d+16)) then
tmp = (-0.3333333333333333d0) * (y * (1.0d0 / z))
else if (y <= 460000000.0d0) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = (y * (-0.3333333333333333d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e+16) {
tmp = -0.3333333333333333 * (y * (1.0 / z));
} else if (y <= 460000000.0) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e+16: tmp = -0.3333333333333333 * (y * (1.0 / z)) elif y <= 460000000.0: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e+16) tmp = Float64(-0.3333333333333333 * Float64(y * Float64(1.0 / z))); elseif (y <= 460000000.0) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e+16) tmp = -0.3333333333333333 * (y * (1.0 / z)); elseif (y <= 460000000.0) tmp = (t / z) * (0.3333333333333333 / y); else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e+16], N[(-0.3333333333333333 * N[(y * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 460000000.0], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+16}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq 460000000:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.3e16Initial program 96.7%
+-commutative96.7%
associate-+r-96.7%
sub-neg96.7%
associate-*l*96.7%
*-commutative96.7%
distribute-frac-neg296.7%
distribute-rgt-neg-in96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in z around 0 77.2%
*-un-lft-identity77.2%
*-commutative77.2%
*-commutative77.2%
fma-define77.2%
clear-num77.2%
un-div-inv77.2%
Applied egg-rr77.2%
*-rgt-identity77.2%
fma-undefine77.2%
+-commutative77.2%
associate-/r/77.2%
metadata-eval77.2%
associate-*r/77.1%
associate-*r/77.2%
metadata-eval77.2%
associate-*l/77.2%
associate-*r/77.2%
*-commutative77.2%
metadata-eval77.2%
distribute-lft-neg-in77.2%
distribute-rgt-neg-in77.2%
distribute-lft-in77.1%
sub-neg77.1%
Simplified77.1%
Taylor expanded in t around 0 68.7%
div-inv68.7%
Applied egg-rr68.7%
if -1.3e16 < y < 4.6e8Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
sub-neg89.3%
associate-*l*89.3%
*-commutative89.3%
distribute-frac-neg289.3%
distribute-rgt-neg-in89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around 0 66.6%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
Simplified62.6%
associate-/l/60.0%
*-commutative60.0%
times-frac65.1%
Applied egg-rr65.1%
if 4.6e8 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 72.9%
*-un-lft-identity72.9%
*-commutative72.9%
*-commutative72.9%
fma-define72.9%
clear-num72.9%
un-div-inv72.9%
Applied egg-rr72.9%
*-rgt-identity72.9%
fma-undefine72.9%
+-commutative72.9%
associate-/r/72.9%
metadata-eval72.9%
associate-*r/72.9%
associate-*r/72.9%
metadata-eval72.9%
associate-*l/72.9%
associate-*r/72.9%
*-commutative72.9%
metadata-eval72.9%
distribute-lft-neg-in72.9%
distribute-rgt-neg-in72.9%
distribute-lft-in72.9%
sub-neg72.9%
Simplified72.9%
Taylor expanded in t around 0 70.3%
Final simplification67.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -114.0)
(* -0.3333333333333333 (* y (/ 1.0 z)))
(if (<= y 6000000.0)
(* (/ t y) (/ 0.3333333333333333 z))
(/ (* y -0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -114.0) {
tmp = -0.3333333333333333 * (y * (1.0 / z));
} else if (y <= 6000000.0) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = (y * -0.3333333333333333) / z;
}
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 <= (-114.0d0)) then
tmp = (-0.3333333333333333d0) * (y * (1.0d0 / z))
else if (y <= 6000000.0d0) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else
tmp = (y * (-0.3333333333333333d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -114.0) {
tmp = -0.3333333333333333 * (y * (1.0 / z));
} else if (y <= 6000000.0) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -114.0: tmp = -0.3333333333333333 * (y * (1.0 / z)) elif y <= 6000000.0: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -114.0) tmp = Float64(-0.3333333333333333 * Float64(y * Float64(1.0 / z))); elseif (y <= 6000000.0) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -114.0) tmp = -0.3333333333333333 * (y * (1.0 / z)); elseif (y <= 6000000.0) tmp = (t / y) * (0.3333333333333333 / z); else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -114.0], N[(-0.3333333333333333 * N[(y * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6000000.0], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -114:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq 6000000:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -114Initial program 96.7%
+-commutative96.7%
associate-+r-96.7%
sub-neg96.7%
associate-*l*96.7%
*-commutative96.7%
distribute-frac-neg296.7%
distribute-rgt-neg-in96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in z around 0 77.2%
*-un-lft-identity77.2%
*-commutative77.2%
*-commutative77.2%
fma-define77.2%
clear-num77.2%
un-div-inv77.2%
Applied egg-rr77.2%
*-rgt-identity77.2%
fma-undefine77.2%
+-commutative77.2%
associate-/r/77.2%
metadata-eval77.2%
associate-*r/77.1%
associate-*r/77.2%
metadata-eval77.2%
associate-*l/77.2%
associate-*r/77.2%
*-commutative77.2%
metadata-eval77.2%
distribute-lft-neg-in77.2%
distribute-rgt-neg-in77.2%
distribute-lft-in77.1%
sub-neg77.1%
Simplified77.1%
Taylor expanded in t around 0 68.7%
div-inv68.7%
Applied egg-rr68.7%
if -114 < y < 6e6Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
sub-neg89.3%
associate-*l*89.3%
*-commutative89.3%
distribute-frac-neg289.3%
distribute-rgt-neg-in89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around 0 66.6%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
Simplified62.6%
associate-/l/60.0%
times-frac62.7%
Applied egg-rr62.7%
if 6e6 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 72.9%
*-un-lft-identity72.9%
*-commutative72.9%
*-commutative72.9%
fma-define72.9%
clear-num72.9%
un-div-inv72.9%
Applied egg-rr72.9%
*-rgt-identity72.9%
fma-undefine72.9%
+-commutative72.9%
associate-/r/72.9%
metadata-eval72.9%
associate-*r/72.9%
associate-*r/72.9%
metadata-eval72.9%
associate-*l/72.9%
associate-*r/72.9%
*-commutative72.9%
metadata-eval72.9%
distribute-lft-neg-in72.9%
distribute-rgt-neg-in72.9%
distribute-lft-in72.9%
sub-neg72.9%
Simplified72.9%
Taylor expanded in t around 0 70.3%
Final simplification65.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -180.0)
(* -0.3333333333333333 (* y (/ 1.0 z)))
(if (<= y 5400000.0)
(* t (/ (/ 0.3333333333333333 z) y))
(/ (* y -0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -180.0) {
tmp = -0.3333333333333333 * (y * (1.0 / z));
} else if (y <= 5400000.0) {
tmp = t * ((0.3333333333333333 / z) / y);
} else {
tmp = (y * -0.3333333333333333) / z;
}
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 <= (-180.0d0)) then
tmp = (-0.3333333333333333d0) * (y * (1.0d0 / z))
else if (y <= 5400000.0d0) then
tmp = t * ((0.3333333333333333d0 / z) / y)
else
tmp = (y * (-0.3333333333333333d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -180.0) {
tmp = -0.3333333333333333 * (y * (1.0 / z));
} else if (y <= 5400000.0) {
tmp = t * ((0.3333333333333333 / z) / y);
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -180.0: tmp = -0.3333333333333333 * (y * (1.0 / z)) elif y <= 5400000.0: tmp = t * ((0.3333333333333333 / z) / y) else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -180.0) tmp = Float64(-0.3333333333333333 * Float64(y * Float64(1.0 / z))); elseif (y <= 5400000.0) tmp = Float64(t * Float64(Float64(0.3333333333333333 / z) / y)); else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -180.0) tmp = -0.3333333333333333 * (y * (1.0 / z)); elseif (y <= 5400000.0) tmp = t * ((0.3333333333333333 / z) / y); else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -180.0], N[(-0.3333333333333333 * N[(y * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5400000.0], N[(t * N[(N[(0.3333333333333333 / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -180:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq 5400000:\\
\;\;\;\;t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -180Initial program 96.7%
+-commutative96.7%
associate-+r-96.7%
sub-neg96.7%
associate-*l*96.7%
*-commutative96.7%
distribute-frac-neg296.7%
distribute-rgt-neg-in96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in z around 0 77.2%
*-un-lft-identity77.2%
*-commutative77.2%
*-commutative77.2%
fma-define77.2%
clear-num77.2%
un-div-inv77.2%
Applied egg-rr77.2%
*-rgt-identity77.2%
fma-undefine77.2%
+-commutative77.2%
associate-/r/77.2%
metadata-eval77.2%
associate-*r/77.1%
associate-*r/77.2%
metadata-eval77.2%
associate-*l/77.2%
associate-*r/77.2%
*-commutative77.2%
metadata-eval77.2%
distribute-lft-neg-in77.2%
distribute-rgt-neg-in77.2%
distribute-lft-in77.1%
sub-neg77.1%
Simplified77.1%
Taylor expanded in t around 0 68.7%
div-inv68.7%
Applied egg-rr68.7%
if -180 < y < 5.4e6Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
sub-neg89.3%
associate-*l*89.3%
*-commutative89.3%
distribute-frac-neg289.3%
distribute-rgt-neg-in89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around 0 66.6%
*-un-lft-identity66.6%
*-commutative66.6%
*-commutative66.6%
fma-define66.6%
clear-num66.6%
un-div-inv66.7%
Applied egg-rr66.7%
*-rgt-identity66.7%
fma-undefine66.7%
+-commutative66.7%
associate-/r/66.6%
metadata-eval66.6%
associate-*r/66.6%
associate-*r/66.6%
metadata-eval66.6%
associate-*l/66.6%
associate-*r/66.6%
*-commutative66.6%
metadata-eval66.6%
distribute-lft-neg-in66.6%
distribute-rgt-neg-in66.6%
distribute-lft-in66.6%
sub-neg66.6%
Simplified66.6%
Taylor expanded in t around 0 64.0%
*-commutative64.0%
*-lft-identity64.0%
associate-*l/64.0%
associate-*r*64.0%
*-commutative64.0%
associate-/r*66.7%
associate-*r/66.6%
*-lft-identity66.6%
associate-*l/66.6%
distribute-lft-in66.6%
+-commutative66.6%
metadata-eval66.6%
distribute-lft-neg-in66.6%
distribute-rgt-neg-out66.6%
distribute-lft-out66.6%
sub-neg66.6%
associate-*r*66.6%
associate-*l/66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in t around inf 60.0%
*-commutative60.0%
associate-*l/60.0%
associate-*r/59.6%
associate-/l/59.6%
Simplified59.6%
if 5.4e6 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 72.9%
*-un-lft-identity72.9%
*-commutative72.9%
*-commutative72.9%
fma-define72.9%
clear-num72.9%
un-div-inv72.9%
Applied egg-rr72.9%
*-rgt-identity72.9%
fma-undefine72.9%
+-commutative72.9%
associate-/r/72.9%
metadata-eval72.9%
associate-*r/72.9%
associate-*r/72.9%
metadata-eval72.9%
associate-*l/72.9%
associate-*r/72.9%
*-commutative72.9%
metadata-eval72.9%
distribute-lft-neg-in72.9%
distribute-rgt-neg-in72.9%
distribute-lft-in72.9%
sub-neg72.9%
Simplified72.9%
Taylor expanded in t around 0 70.3%
Final simplification63.9%
(FPCore (x y z t) :precision binary64 (if (<= x -1.5e+81) x (if (<= x 7.2e+61) (/ (* y -0.3333333333333333) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.5e+81) {
tmp = x;
} else if (x <= 7.2e+61) {
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 <= (-1.5d+81)) then
tmp = x
else if (x <= 7.2d+61) 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 <= -1.5e+81) {
tmp = x;
} else if (x <= 7.2e+61) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.5e+81: tmp = x elif x <= 7.2e+61: tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.5e+81) tmp = x; elseif (x <= 7.2e+61) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.5e+81) tmp = x; elseif (x <= 7.2e+61) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.5e+81], x, If[LessEqual[x, 7.2e+61], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+61}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.49999999999999999e81 or 7.20000000000000021e61 < x Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
+-commutative93.9%
associate--l+93.9%
sub-neg93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac96.0%
distribute-frac-neg96.0%
neg-mul-196.0%
*-commutative96.0%
associate-/l*96.0%
*-commutative96.0%
Simplified95.9%
Taylor expanded in x around inf 57.7%
if -1.49999999999999999e81 < x < 7.20000000000000021e61Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
sub-neg92.8%
associate-*l*92.8%
*-commutative92.8%
distribute-frac-neg292.8%
distribute-rgt-neg-in92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in z around 0 88.0%
*-un-lft-identity88.0%
*-commutative88.0%
*-commutative88.0%
fma-define88.0%
clear-num87.9%
un-div-inv88.0%
Applied egg-rr88.0%
*-rgt-identity88.0%
fma-undefine88.0%
+-commutative88.0%
associate-/r/88.0%
metadata-eval88.0%
associate-*r/88.0%
associate-*r/88.0%
metadata-eval88.0%
associate-*l/88.0%
associate-*r/88.0%
*-commutative88.0%
metadata-eval88.0%
distribute-lft-neg-in88.0%
distribute-rgt-neg-in88.0%
distribute-lft-in88.0%
sub-neg88.0%
Simplified88.0%
Taylor expanded in t around 0 44.2%
Final simplification49.2%
(FPCore (x y z t) :precision binary64 (if (<= x -4.8e+81) x (if (<= x 3.1e+59) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.8e+81) {
tmp = x;
} else if (x <= 3.1e+59) {
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 <= (-4.8d+81)) then
tmp = x
else if (x <= 3.1d+59) 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 <= -4.8e+81) {
tmp = x;
} else if (x <= 3.1e+59) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.8e+81: tmp = x elif x <= 3.1e+59: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.8e+81) tmp = x; elseif (x <= 3.1e+59) 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 <= -4.8e+81) tmp = x; elseif (x <= 3.1e+59) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.8e+81], x, If[LessEqual[x, 3.1e+59], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+59}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.79999999999999979e81 or 3.10000000000000015e59 < x Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
+-commutative93.9%
associate--l+93.9%
sub-neg93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac96.0%
distribute-frac-neg96.0%
neg-mul-196.0%
*-commutative96.0%
associate-/l*96.0%
*-commutative96.0%
Simplified95.9%
Taylor expanded in x around inf 57.7%
if -4.79999999999999979e81 < x < 3.10000000000000015e59Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
sub-neg92.8%
associate-*l*92.8%
*-commutative92.8%
distribute-frac-neg292.8%
distribute-rgt-neg-in92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in z around 0 88.0%
*-un-lft-identity88.0%
*-commutative88.0%
*-commutative88.0%
fma-define88.0%
clear-num87.9%
un-div-inv88.0%
Applied egg-rr88.0%
*-rgt-identity88.0%
fma-undefine88.0%
+-commutative88.0%
associate-/r/88.0%
metadata-eval88.0%
associate-*r/88.0%
associate-*r/88.0%
metadata-eval88.0%
associate-*l/88.0%
associate-*r/88.0%
*-commutative88.0%
metadata-eval88.0%
distribute-lft-neg-in88.0%
distribute-rgt-neg-in88.0%
distribute-lft-in88.0%
sub-neg88.0%
Simplified88.0%
Taylor expanded in t around 0 84.0%
*-commutative84.0%
*-lft-identity84.0%
associate-*l/84.0%
associate-*r*84.0%
*-commutative84.0%
associate-/r*88.0%
associate-*r/87.9%
*-lft-identity87.9%
associate-*l/87.9%
distribute-lft-in88.0%
+-commutative88.0%
metadata-eval88.0%
distribute-lft-neg-in88.0%
distribute-rgt-neg-out88.0%
distribute-lft-out88.0%
sub-neg88.0%
associate-*r*88.0%
associate-*l/88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 44.1%
metadata-eval52.5%
distribute-lft-neg-in52.5%
associate-*r/52.5%
associate-*l/52.5%
*-commutative52.5%
distribute-rgt-neg-in52.5%
distribute-neg-frac52.5%
metadata-eval52.5%
Simplified44.1%
(FPCore (x y z t) :precision binary64 (if (<= x -4.8e+81) x (if (<= x 2.6e+59) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.8e+81) {
tmp = x;
} else if (x <= 2.6e+59) {
tmp = -0.3333333333333333 * (y / 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 <= (-4.8d+81)) then
tmp = x
else if (x <= 2.6d+59) then
tmp = (-0.3333333333333333d0) * (y / 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 <= -4.8e+81) {
tmp = x;
} else if (x <= 2.6e+59) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.8e+81: tmp = x elif x <= 2.6e+59: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.8e+81) tmp = x; elseif (x <= 2.6e+59) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.8e+81) tmp = x; elseif (x <= 2.6e+59) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.8e+81], x, If[LessEqual[x, 2.6e+59], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+59}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.79999999999999979e81 or 2.59999999999999999e59 < x Initial program 93.9%
+-commutative93.9%
associate-+r-93.9%
+-commutative93.9%
associate--l+93.9%
sub-neg93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac96.0%
distribute-frac-neg96.0%
neg-mul-196.0%
*-commutative96.0%
associate-/l*96.0%
*-commutative96.0%
Simplified95.9%
Taylor expanded in x around inf 57.7%
if -4.79999999999999979e81 < x < 2.59999999999999999e59Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
sub-neg92.8%
associate-*l*92.8%
*-commutative92.8%
distribute-frac-neg292.8%
distribute-rgt-neg-in92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in z around 0 88.0%
*-un-lft-identity88.0%
*-commutative88.0%
*-commutative88.0%
fma-define88.0%
clear-num87.9%
un-div-inv88.0%
Applied egg-rr88.0%
*-rgt-identity88.0%
fma-undefine88.0%
+-commutative88.0%
associate-/r/88.0%
metadata-eval88.0%
associate-*r/88.0%
associate-*r/88.0%
metadata-eval88.0%
associate-*l/88.0%
associate-*r/88.0%
*-commutative88.0%
metadata-eval88.0%
distribute-lft-neg-in88.0%
distribute-rgt-neg-in88.0%
distribute-lft-in88.0%
sub-neg88.0%
Simplified88.0%
Taylor expanded in t around 0 44.1%
(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 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
associate-/l*96.4%
*-commutative96.4%
Simplified96.4%
metadata-eval96.4%
associate-/r*96.4%
*-commutative96.4%
associate-*l/96.5%
*-un-lft-identity96.5%
Applied egg-rr96.5%
(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 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
associate-/l*96.4%
*-commutative96.4%
Simplified96.4%
Final simplification96.4%
(FPCore (x y z t) :precision binary64 (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / 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 + (0.3333333333333333d0 * (((t / y) - y) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / z));
}
def code(x, y, z, t): return x + (0.3333333333333333 * (((t / y) - y) / z))
function code(x, y, z, t) return Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))) end
function tmp = code(x, y, z, t) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}
\end{array}
Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
associate-/l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in z around 0 96.4%
(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 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
associate-/l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around inf 28.0%
(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 2024146
(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))))