
(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 12 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
(let* ((t_1 (/ y (* z 3.0))))
(if (<= (+ (- x t_1) (/ t (* y (* z 3.0)))) 2e+287)
(+ x (- (/ t (* z (* y 3.0))) t_1))
(+ x (/ 1.0 (* 3.0 (/ z (- (/ t y) y))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * 3.0);
double tmp;
if (((x - t_1) + (t / (y * (z * 3.0)))) <= 2e+287) {
tmp = x + ((t / (z * (y * 3.0))) - t_1);
} else {
tmp = x + (1.0 / (3.0 * (z / ((t / y) - 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) :: t_1
real(8) :: tmp
t_1 = y / (z * 3.0d0)
if (((x - t_1) + (t / (y * (z * 3.0d0)))) <= 2d+287) then
tmp = x + ((t / (z * (y * 3.0d0))) - t_1)
else
tmp = x + (1.0d0 / (3.0d0 * (z / ((t / y) - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (z * 3.0);
double tmp;
if (((x - t_1) + (t / (y * (z * 3.0)))) <= 2e+287) {
tmp = x + ((t / (z * (y * 3.0))) - t_1);
} else {
tmp = x + (1.0 / (3.0 * (z / ((t / y) - y))));
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * 3.0) tmp = 0 if ((x - t_1) + (t / (y * (z * 3.0)))) <= 2e+287: tmp = x + ((t / (z * (y * 3.0))) - t_1) else: tmp = x + (1.0 / (3.0 * (z / ((t / y) - y)))) return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * 3.0)) tmp = 0.0 if (Float64(Float64(x - t_1) + Float64(t / Float64(y * Float64(z * 3.0)))) <= 2e+287) tmp = Float64(x + Float64(Float64(t / Float64(z * Float64(y * 3.0))) - t_1)); else tmp = Float64(x + Float64(1.0 / Float64(3.0 * Float64(z / Float64(Float64(t / y) - y))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * 3.0); tmp = 0.0; if (((x - t_1) + (t / (y * (z * 3.0)))) <= 2e+287) tmp = x + ((t / (z * (y * 3.0))) - t_1); else tmp = x + (1.0 / (3.0 * (z / ((t / y) - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(x - t$95$1), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+287], N[(x + N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(3.0 * N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot 3}\\
\mathbf{if}\;\left(x - t_1\right) + \frac{t}{y \cdot \left(z \cdot 3\right)} \leq 2 \cdot 10^{+287}:\\
\;\;\;\;x + \left(\frac{t}{z \cdot \left(y \cdot 3\right)} - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{3 \cdot \frac{z}{\frac{t}{y} - y}}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 2.0000000000000002e287Initial program 98.4%
associate-+l-98.4%
associate-/r*95.5%
associate-/r*98.4%
associate-*l*98.4%
Applied egg-rr98.4%
if 2.0000000000000002e287 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) Initial program 75.7%
associate-+l-75.7%
sub-neg75.7%
sub-neg75.7%
distribute-neg-in75.7%
unsub-neg75.7%
neg-mul-175.7%
associate-*r/75.7%
associate-*l/75.7%
distribute-neg-frac75.7%
neg-mul-175.7%
times-frac91.3%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 75.6%
+-commutative75.6%
metadata-eval75.6%
cancel-sign-sub-inv75.6%
associate-/r*91.3%
associate-*r/91.3%
associate-*r/91.3%
div-sub99.8%
distribute-lft-out--99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
clear-num99.8%
div-inv99.8%
clear-num99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))) (if (<= t_1 5e+304) t_1 (+ x (/ 1.0 (* 3.0 (/ z (- (/ t y) y))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 5e+304) {
tmp = t_1;
} else {
tmp = x + (1.0 / (3.0 * (z / ((t / y) - 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) :: t_1
real(8) :: tmp
t_1 = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
if (t_1 <= 5d+304) then
tmp = t_1
else
tmp = x + (1.0d0 / (3.0d0 * (z / ((t / y) - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 5e+304) {
tmp = t_1;
} else {
tmp = x + (1.0 / (3.0 * (z / ((t / y) - y))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) tmp = 0 if t_1 <= 5e+304: tmp = t_1 else: tmp = x + (1.0 / (3.0 * (z / ((t / y) - y)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) tmp = 0.0 if (t_1 <= 5e+304) tmp = t_1; else tmp = Float64(x + Float64(1.0 / Float64(3.0 * Float64(z / Float64(Float64(t / y) - y))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); tmp = 0.0; if (t_1 <= 5e+304) tmp = t_1; else tmp = x + (1.0 / (3.0 * (z / ((t / y) - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+304], t$95$1, N[(x + N[(1.0 / N[(3.0 * N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{3 \cdot \frac{z}{\frac{t}{y} - y}}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 4.9999999999999997e304Initial program 98.4%
if 4.9999999999999997e304 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) Initial program 74.6%
associate-+l-74.6%
sub-neg74.6%
sub-neg74.6%
distribute-neg-in74.6%
unsub-neg74.6%
neg-mul-174.6%
associate-*r/74.6%
associate-*l/74.6%
distribute-neg-frac74.6%
neg-mul-174.6%
times-frac91.0%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
associate-/r*91.0%
associate-*r/90.9%
associate-*r/90.9%
div-sub99.8%
distribute-lft-out--99.8%
Simplified99.8%
Taylor expanded in x around 0 99.9%
clear-num99.8%
div-inv99.8%
clear-num99.8%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1e-98) (not (<= y 3.4e-194))) (+ x (/ 1.0 (* 3.0 (/ z (- (/ t y) y))))) (+ x (/ (* 0.3333333333333333 (/ t z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-98) || !(y <= 3.4e-194)) {
tmp = x + (1.0 / (3.0 * (z / ((t / y) - y))));
} 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 <= (-1d-98)) .or. (.not. (y <= 3.4d-194))) then
tmp = x + (1.0d0 / (3.0d0 * (z / ((t / y) - y))))
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 <= -1e-98) || !(y <= 3.4e-194)) {
tmp = x + (1.0 / (3.0 * (z / ((t / y) - y))));
} else {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1e-98) or not (y <= 3.4e-194): tmp = x + (1.0 / (3.0 * (z / ((t / y) - y)))) else: tmp = x + ((0.3333333333333333 * (t / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1e-98) || !(y <= 3.4e-194)) tmp = Float64(x + Float64(1.0 / Float64(3.0 * Float64(z / Float64(Float64(t / y) - y))))); else tmp = Float64(x + 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 <= -1e-98) || ~((y <= 3.4e-194))) tmp = x + (1.0 / (3.0 * (z / ((t / y) - y)))); else tmp = x + ((0.3333333333333333 * (t / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1e-98], N[Not[LessEqual[y, 3.4e-194]], $MachinePrecision]], N[(x + N[(1.0 / N[(3.0 * N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-98} \lor \neg \left(y \leq 3.4 \cdot 10^{-194}\right):\\
\;\;\;\;x + \frac{1}{3 \cdot \frac{z}{\frac{t}{y} - y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -9.99999999999999939e-99 or 3.40000000000000009e-194 < y Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac96.5%
distribute-lft-out--98.7%
*-commutative98.7%
associate-/r*98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in y around 0 95.4%
+-commutative95.4%
metadata-eval95.4%
cancel-sign-sub-inv95.4%
associate-/r*96.4%
associate-*r/96.4%
associate-*r/96.4%
div-sub98.7%
distribute-lft-out--98.6%
Simplified98.6%
Taylor expanded in x around 0 98.6%
clear-num98.6%
div-inv98.6%
clear-num98.6%
div-inv98.8%
metadata-eval98.8%
Applied egg-rr98.8%
if -9.99999999999999939e-99 < y < 3.40000000000000009e-194Initial program 91.0%
associate-+l-91.0%
sub-neg91.0%
sub-neg91.0%
distribute-neg-in91.0%
unsub-neg91.0%
neg-mul-191.0%
associate-*r/91.0%
associate-*l/91.0%
distribute-neg-frac91.0%
neg-mul-191.0%
times-frac81.9%
distribute-lft-out--81.9%
*-commutative81.9%
associate-/r*81.9%
metadata-eval81.9%
Simplified81.9%
Taylor expanded in y around 0 91.0%
*-commutative91.0%
associate-*l/91.0%
times-frac81.9%
Simplified81.9%
associate-*l/98.4%
Applied egg-rr98.4%
Taylor expanded in t around 0 98.5%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.2e-55) (not (<= y 5.5e-194))) (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))) (+ x (/ (* 0.3333333333333333 (/ t z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.2e-55) || !(y <= 5.5e-194)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} 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.2d-55)) .or. (.not. (y <= 5.5d-194))) then
tmp = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
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.2e-55) || !(y <= 5.5e-194)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} else {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.2e-55) or not (y <= 5.5e-194): tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))) else: tmp = x + ((0.3333333333333333 * (t / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.2e-55) || !(y <= 5.5e-194)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))); else tmp = Float64(x + 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.2e-55) || ~((y <= 5.5e-194))) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); else tmp = x + ((0.3333333333333333 * (t / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.2e-55], N[Not[LessEqual[y, 5.5e-194]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-55} \lor \neg \left(y \leq 5.5 \cdot 10^{-194}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.19999999999999996e-55 or 5.49999999999999941e-194 < y Initial program 95.3%
associate-+l-95.3%
sub-neg95.3%
sub-neg95.3%
distribute-neg-in95.3%
unsub-neg95.3%
neg-mul-195.3%
associate-*r/95.3%
associate-*l/95.2%
distribute-neg-frac95.2%
neg-mul-195.2%
times-frac96.3%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
if -1.19999999999999996e-55 < y < 5.49999999999999941e-194Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/92.0%
distribute-neg-frac92.0%
neg-mul-192.0%
times-frac83.9%
distribute-lft-out--83.9%
*-commutative83.9%
associate-/r*83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in y around 0 92.0%
*-commutative92.0%
associate-*l/92.0%
times-frac83.8%
Simplified83.8%
associate-*l/98.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 98.6%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -3.7e-98)
(- x (/ (* 0.3333333333333333 t_1) z))
(if (<= y 5.8e-194)
(+ x (/ (* 0.3333333333333333 (/ t z)) y))
(+ x (* (/ -0.3333333333333333 z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.7e-98) {
tmp = x - ((0.3333333333333333 * t_1) / z);
} else if (y <= 5.8e-194) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 / z) * 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 - (t / y)
if (y <= (-3.7d-98)) then
tmp = x - ((0.3333333333333333d0 * t_1) / z)
else if (y <= 5.8d-194) then
tmp = x + ((0.3333333333333333d0 * (t / z)) / y)
else
tmp = x + (((-0.3333333333333333d0) / z) * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.7e-98) {
tmp = x - ((0.3333333333333333 * t_1) / z);
} else if (y <= 5.8e-194) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 / z) * t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -3.7e-98: tmp = x - ((0.3333333333333333 * t_1) / z) elif y <= 5.8e-194: tmp = x + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((-0.3333333333333333 / z) * t_1) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -3.7e-98) tmp = Float64(x - Float64(Float64(0.3333333333333333 * t_1) / z)); elseif (y <= 5.8e-194) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -3.7e-98) tmp = x - ((0.3333333333333333 * t_1) / z); elseif (y <= 5.8e-194) tmp = x + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((-0.3333333333333333 / z) * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e-98], N[(x - N[(N[(0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-194], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{-98}:\\
\;\;\;\;x - \frac{0.3333333333333333 \cdot t_1}{z}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-194}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot t_1\\
\end{array}
\end{array}
if y < -3.7e-98Initial program 96.4%
associate-+l-96.4%
sub-neg96.4%
sub-neg96.4%
distribute-neg-in96.4%
unsub-neg96.4%
neg-mul-196.4%
associate-*r/96.4%
associate-*l/96.3%
distribute-neg-frac96.3%
neg-mul-196.3%
times-frac96.2%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 96.2%
+-commutative96.2%
metadata-eval96.2%
cancel-sign-sub-inv96.2%
associate-/r*96.2%
associate-*r/96.2%
associate-*r/96.3%
div-sub99.7%
distribute-lft-out--99.7%
Simplified99.7%
if -3.7e-98 < y < 5.7999999999999994e-194Initial program 91.0%
associate-+l-91.0%
sub-neg91.0%
sub-neg91.0%
distribute-neg-in91.0%
unsub-neg91.0%
neg-mul-191.0%
associate-*r/91.0%
associate-*l/91.0%
distribute-neg-frac91.0%
neg-mul-191.0%
times-frac81.9%
distribute-lft-out--81.9%
*-commutative81.9%
associate-/r*81.9%
metadata-eval81.9%
Simplified81.9%
Taylor expanded in y around 0 91.0%
*-commutative91.0%
associate-*l/91.0%
times-frac81.9%
Simplified81.9%
associate-*l/98.4%
Applied egg-rr98.4%
Taylor expanded in t around 0 98.5%
if 5.7999999999999994e-194 < y Initial program 94.8%
associate-+l-94.8%
sub-neg94.8%
sub-neg94.8%
distribute-neg-in94.8%
unsub-neg94.8%
neg-mul-194.8%
associate-*r/94.8%
associate-*l/94.7%
distribute-neg-frac94.7%
neg-mul-194.7%
times-frac96.7%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.8%
metadata-eval97.8%
Simplified97.8%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e-56)
(+ x (* (* (- (/ t y) y) 0.3333333333333333) (/ 1.0 z)))
(if (<= y 5.5e-194)
(+ x (/ (* 0.3333333333333333 (/ t z)) y))
(+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-56) {
tmp = x + ((((t / y) - y) * 0.3333333333333333) * (1.0 / z));
} else if (y <= 5.5e-194) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / 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 <= (-8d-56)) then
tmp = x + ((((t / y) - y) * 0.3333333333333333d0) * (1.0d0 / z))
else if (y <= 5.5d-194) then
tmp = x + ((0.3333333333333333d0 * (t / z)) / y)
else
tmp = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-56) {
tmp = x + ((((t / y) - y) * 0.3333333333333333) * (1.0 / z));
} else if (y <= 5.5e-194) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-56: tmp = x + ((((t / y) - y) * 0.3333333333333333) * (1.0 / z)) elif y <= 5.5e-194: tmp = x + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-56) tmp = Float64(x + Float64(Float64(Float64(Float64(t / y) - y) * 0.3333333333333333) * Float64(1.0 / z))); elseif (y <= 5.5e-194) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e-56) tmp = x + ((((t / y) - y) * 0.3333333333333333) * (1.0 / z)); elseif (y <= 5.5e-194) tmp = x + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-56], N[(x + N[(N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-194], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-56}:\\
\;\;\;\;x + \left(\left(\frac{t}{y} - y\right) \cdot 0.3333333333333333\right) \cdot \frac{1}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-194}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\
\end{array}
\end{array}
if y < -8.0000000000000003e-56Initial program 96.0%
associate-+l-96.0%
sub-neg96.0%
sub-neg96.0%
distribute-neg-in96.0%
unsub-neg96.0%
neg-mul-196.0%
associate-*r/96.0%
associate-*l/95.9%
distribute-neg-frac95.9%
neg-mul-195.9%
times-frac95.9%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 95.7%
+-commutative95.7%
metadata-eval95.7%
cancel-sign-sub-inv95.7%
associate-/r*95.8%
associate-*r/95.8%
associate-*r/95.9%
div-sub99.7%
distribute-lft-out--99.7%
Simplified99.7%
div-inv99.7%
Applied egg-rr99.7%
if -8.0000000000000003e-56 < y < 5.49999999999999941e-194Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/92.0%
distribute-neg-frac92.0%
neg-mul-192.0%
times-frac83.9%
distribute-lft-out--83.9%
*-commutative83.9%
associate-/r*83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in y around 0 92.0%
*-commutative92.0%
associate-*l/92.0%
times-frac83.8%
Simplified83.8%
associate-*l/98.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 98.6%
if 5.49999999999999941e-194 < y Initial program 94.8%
associate-+l-94.8%
sub-neg94.8%
sub-neg94.8%
distribute-neg-in94.8%
unsub-neg94.8%
neg-mul-194.8%
associate-*r/94.8%
associate-*l/94.7%
distribute-neg-frac94.7%
neg-mul-194.7%
times-frac96.7%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.8%
metadata-eval97.8%
Simplified97.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.75e+16) (not (<= y 2.2e+45))) (+ 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 <= -1.75e+16) || !(y <= 2.2e+45)) {
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 <= (-1.75d+16)) .or. (.not. (y <= 2.2d+45))) 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 <= -1.75e+16) || !(y <= 2.2e+45)) {
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 <= -1.75e+16) or not (y <= 2.2e+45): 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 <= -1.75e+16) || !(y <= 2.2e+45)) 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 <= -1.75e+16) || ~((y <= 2.2e+45))) 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, -1.75e+16], N[Not[LessEqual[y, 2.2e+45]], $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 -1.75 \cdot 10^{+16} \lor \neg \left(y \leq 2.2 \cdot 10^{+45}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.75e16 or 2.2e45 < y Initial program 96.2%
associate-+l-96.2%
sub-neg96.2%
sub-neg96.2%
distribute-neg-in96.2%
unsub-neg96.2%
neg-mul-196.2%
associate-*r/96.2%
associate-*l/96.0%
distribute-neg-frac96.0%
neg-mul-196.0%
times-frac96.0%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 93.4%
clear-num93.4%
inv-pow93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
associate-*l/93.5%
*-un-lft-identity93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 93.6%
*-commutative93.6%
Simplified93.6%
if -1.75e16 < y < 2.2e45Initial program 92.8%
associate-+l-92.8%
sub-neg92.8%
sub-neg92.8%
distribute-neg-in92.8%
unsub-neg92.8%
neg-mul-192.8%
associate-*r/92.8%
associate-*l/92.8%
distribute-neg-frac92.8%
neg-mul-192.8%
times-frac89.5%
distribute-lft-out--89.5%
*-commutative89.5%
associate-/r*89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in y around 0 91.3%
*-commutative91.3%
associate-*l/91.3%
times-frac86.6%
Simplified86.6%
Final simplification89.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.05e+16) (not (<= y 7.5e+41))) (+ 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.05e+16) || !(y <= 7.5e+41)) {
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.05d+16)) .or. (.not. (y <= 7.5d+41))) 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.05e+16) || !(y <= 7.5e+41)) {
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.05e+16) or not (y <= 7.5e+41): 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.05e+16) || !(y <= 7.5e+41)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + 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.05e+16) || ~((y <= 7.5e+41))) 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.05e+16], N[Not[LessEqual[y, 7.5e+41]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+16} \lor \neg \left(y \leq 7.5 \cdot 10^{+41}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.05e16 or 7.50000000000000072e41 < y Initial program 96.2%
associate-+l-96.2%
sub-neg96.2%
sub-neg96.2%
distribute-neg-in96.2%
unsub-neg96.2%
neg-mul-196.2%
associate-*r/96.2%
associate-*l/96.0%
distribute-neg-frac96.0%
neg-mul-196.0%
times-frac96.0%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 93.4%
clear-num93.4%
inv-pow93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
associate-*l/93.5%
*-un-lft-identity93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 93.6%
*-commutative93.6%
Simplified93.6%
if -1.05e16 < y < 7.50000000000000072e41Initial program 92.8%
associate-+l-92.8%
sub-neg92.8%
sub-neg92.8%
distribute-neg-in92.8%
unsub-neg92.8%
neg-mul-192.8%
associate-*r/92.8%
associate-*l/92.8%
distribute-neg-frac92.8%
neg-mul-192.8%
times-frac89.5%
distribute-lft-out--89.5%
*-commutative89.5%
associate-/r*89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in y around 0 91.3%
*-commutative91.3%
associate-*l/91.3%
times-frac86.6%
Simplified86.6%
associate-*l/95.5%
Applied egg-rr95.5%
Taylor expanded in t around 0 95.5%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.4e+15) (not (<= y 3.1e+42))) (+ 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 <= -2.4e+15) || !(y <= 3.1e+42)) {
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 <= (-2.4d+15)) .or. (.not. (y <= 3.1d+42))) 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 <= -2.4e+15) || !(y <= 3.1e+42)) {
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 <= -2.4e+15) or not (y <= 3.1e+42): 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 <= -2.4e+15) || !(y <= 3.1e+42)) 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 <= -2.4e+15) || ~((y <= 3.1e+42))) 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, -2.4e+15], N[Not[LessEqual[y, 3.1e+42]], $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 -2.4 \cdot 10^{+15} \lor \neg \left(y \leq 3.1 \cdot 10^{+42}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -2.4e15 or 3.1000000000000002e42 < y Initial program 96.2%
associate-+l-96.2%
sub-neg96.2%
sub-neg96.2%
distribute-neg-in96.2%
unsub-neg96.2%
neg-mul-196.2%
associate-*r/96.2%
associate-*l/96.0%
distribute-neg-frac96.0%
neg-mul-196.0%
times-frac96.0%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 93.4%
clear-num93.4%
inv-pow93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
associate-*l/93.5%
*-un-lft-identity93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 93.6%
*-commutative93.6%
Simplified93.6%
if -2.4e15 < y < 3.1000000000000002e42Initial program 92.8%
associate-+l-92.8%
sub-neg92.8%
sub-neg92.8%
distribute-neg-in92.8%
unsub-neg92.8%
neg-mul-192.8%
associate-*r/92.8%
associate-*l/92.8%
distribute-neg-frac92.8%
neg-mul-192.8%
times-frac89.5%
distribute-lft-out--89.5%
*-commutative89.5%
associate-/r*89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in y around 0 91.3%
*-commutative91.3%
associate-*l/91.3%
times-frac86.6%
Simplified86.6%
associate-*l/95.5%
Applied egg-rr95.5%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (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 + (y * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (y * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (y * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac92.3%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf 65.0%
Final simplification65.0%
(FPCore (x y z t) :precision binary64 (+ x (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + (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 + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + (y / (z * -3.0));
}
def code(x, y, z, t): return x + (y / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{z \cdot -3}
\end{array}
Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac92.3%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf 65.0%
clear-num65.0%
inv-pow65.0%
Applied egg-rr65.0%
unpow-165.0%
Simplified65.0%
associate-*l/65.0%
*-un-lft-identity65.0%
Applied egg-rr65.0%
Taylor expanded in z around 0 65.1%
*-commutative65.1%
Simplified65.1%
Final simplification65.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 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac92.3%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in x around inf 31.0%
Final simplification31.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 2023195
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))