
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (- x (* z (+ y -1.0))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY) t_1 (* y (- b z)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = y * (b - z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(z * Float64(y + -1.0))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(y * Float64(b - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = y * (b - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in y around inf 82.0%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 95.7%
+-commutative95.7%
fma-define97.7%
associate--l+97.7%
sub-neg97.7%
metadata-eval97.7%
sub-neg97.7%
associate-+l-97.7%
fma-neg98.0%
sub-neg98.0%
metadata-eval98.0%
remove-double-neg98.0%
sub-neg98.0%
metadata-eval98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -5e+63) (not (<= b 1.4e+129)))
(+ (+ x (* b (- (+ y t) 2.0))) t_1)
(+ x (+ (* z (- 1.0 y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -5e+63) || !(b <= 1.4e+129)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + ((z * (1.0 - y)) + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if ((b <= (-5d+63)) .or. (.not. (b <= 1.4d+129))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
else
tmp = x + ((z * (1.0d0 - y)) + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -5e+63) || !(b <= 1.4e+129)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + ((z * (1.0 - y)) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if (b <= -5e+63) or not (b <= 1.4e+129): tmp = (x + (b * ((y + t) - 2.0))) + t_1 else: tmp = x + ((z * (1.0 - y)) + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if ((b <= -5e+63) || !(b <= 1.4e+129)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); else tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if ((b <= -5e+63) || ~((b <= 1.4e+129))) tmp = (x + (b * ((y + t) - 2.0))) + t_1; else tmp = x + ((z * (1.0 - y)) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -5e+63], N[Not[LessEqual[b, 1.4e+129]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -5 \cdot 10^{+63} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + t\_1\right)\\
\end{array}
\end{array}
if b < -5.00000000000000011e63 or 1.39999999999999987e129 < b Initial program 94.0%
Taylor expanded in z around 0 95.2%
if -5.00000000000000011e63 < b < 1.39999999999999987e129Initial program 96.5%
Taylor expanded in b around 0 88.3%
Final simplification90.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.3e+64) (not (<= b 1.4e+129))) (+ x (* b (- (+ y t) 2.0))) (+ x (+ (* z (- 1.0 y)) (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.3e+64) || !(b <= 1.4e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-2.3d+64)) .or. (.not. (b <= 1.4d+129))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + ((z * (1.0d0 - y)) + (a * (1.0d0 - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.3e+64) || !(b <= 1.4e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.3e+64) or not (b <= 1.4e+129): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.3e+64) || !(b <= 1.4e+129)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + Float64(a * Float64(1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.3e+64) || ~((b <= 1.4e+129))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.3e+64], N[Not[LessEqual[b, 1.4e+129]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+64} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -2.3e64 or 1.39999999999999987e129 < b Initial program 94.0%
Taylor expanded in z around 0 95.2%
Taylor expanded in a around 0 86.8%
if -2.3e64 < b < 1.39999999999999987e129Initial program 96.5%
Taylor expanded in b around 0 88.3%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -2000000000.0)
t_1
(if (<= y 1.6e-210)
(* t (- b a))
(if (<= y 8.6e+58) (* a (- 1.0 t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -2000000000.0) {
tmp = t_1;
} else if (y <= 1.6e-210) {
tmp = t * (b - a);
} else if (y <= 8.6e+58) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (b - z)
if (y <= (-2000000000.0d0)) then
tmp = t_1
else if (y <= 1.6d-210) then
tmp = t * (b - a)
else if (y <= 8.6d+58) then
tmp = a * (1.0d0 - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -2000000000.0) {
tmp = t_1;
} else if (y <= 1.6e-210) {
tmp = t * (b - a);
} else if (y <= 8.6e+58) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -2000000000.0: tmp = t_1 elif y <= 1.6e-210: tmp = t * (b - a) elif y <= 8.6e+58: tmp = a * (1.0 - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -2000000000.0) tmp = t_1; elseif (y <= 1.6e-210) tmp = Float64(t * Float64(b - a)); elseif (y <= 8.6e+58) tmp = Float64(a * Float64(1.0 - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -2000000000.0) tmp = t_1; elseif (y <= 1.6e-210) tmp = t * (b - a); elseif (y <= 8.6e+58) tmp = a * (1.0 - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2000000000.0], t$95$1, If[LessEqual[y, 1.6e-210], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e+58], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-210}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+58}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2e9 or 8.59999999999999982e58 < y Initial program 91.6%
Taylor expanded in y around inf 78.9%
if -2e9 < y < 1.60000000000000014e-210Initial program 98.8%
Taylor expanded in t around inf 39.4%
if 1.60000000000000014e-210 < y < 8.59999999999999982e58Initial program 100.0%
Taylor expanded in a around inf 43.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.2e+63) (not (<= b 1.4e+129))) (+ x (* b (- (+ y t) 2.0))) (+ (+ x a) (* z (- 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.2e+63) || !(b <= 1.4e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + a) + (z * (1.0 - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-6.2d+63)) .or. (.not. (b <= 1.4d+129))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = (x + a) + (z * (1.0d0 - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.2e+63) || !(b <= 1.4e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + a) + (z * (1.0 - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.2e+63) or not (b <= 1.4e+129): tmp = x + (b * ((y + t) - 2.0)) else: tmp = (x + a) + (z * (1.0 - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.2e+63) || !(b <= 1.4e+129)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(Float64(x + a) + Float64(z * Float64(1.0 - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -6.2e+63) || ~((b <= 1.4e+129))) tmp = x + (b * ((y + t) - 2.0)); else tmp = (x + a) + (z * (1.0 - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.2e+63], N[Not[LessEqual[b, 1.4e+129]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + a), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+63} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if b < -6.2000000000000001e63 or 1.39999999999999987e129 < b Initial program 94.0%
Taylor expanded in z around 0 95.2%
Taylor expanded in a around 0 86.8%
if -6.2000000000000001e63 < b < 1.39999999999999987e129Initial program 96.5%
Taylor expanded in b around 0 88.3%
Taylor expanded in t around 0 73.3%
associate--r+73.3%
sub-neg73.3%
metadata-eval73.3%
sub-neg73.3%
sub-neg73.3%
mul-1-neg73.3%
remove-double-neg73.3%
distribute-rgt-neg-in73.3%
distribute-neg-in73.3%
metadata-eval73.3%
+-commutative73.3%
sub-neg73.3%
Simplified73.3%
Final simplification77.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.5e+63) (not (<= b 1.4e+129))) (+ x (* b (- (+ y t) 2.0))) (- x (* z (+ y -1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.5e+63) || !(b <= 1.4e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x - (z * (y + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5.5d+63)) .or. (.not. (b <= 1.4d+129))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x - (z * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.5e+63) || !(b <= 1.4e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x - (z * (y + -1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.5e+63) or not (b <= 1.4e+129): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x - (z * (y + -1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.5e+63) || !(b <= 1.4e+129)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x - Float64(z * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.5e+63) || ~((b <= 1.4e+129))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x - (z * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.5e+63], N[Not[LessEqual[b, 1.4e+129]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+63} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if b < -5.50000000000000004e63 or 1.39999999999999987e129 < b Initial program 94.0%
Taylor expanded in z around 0 95.2%
Taylor expanded in a around 0 86.8%
if -5.50000000000000004e63 < b < 1.39999999999999987e129Initial program 96.5%
Taylor expanded in b around 0 88.3%
Taylor expanded in a around 0 62.5%
Final simplification70.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- y))))
(if (<= y -1.25e-36)
t_1
(if (<= y -1.7e-196) x (if (<= y 2.4e+61) (* t (- a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * -y;
double tmp;
if (y <= -1.25e-36) {
tmp = t_1;
} else if (y <= -1.7e-196) {
tmp = x;
} else if (y <= 2.4e+61) {
tmp = t * -a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * -y
if (y <= (-1.25d-36)) then
tmp = t_1
else if (y <= (-1.7d-196)) then
tmp = x
else if (y <= 2.4d+61) then
tmp = t * -a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * -y;
double tmp;
if (y <= -1.25e-36) {
tmp = t_1;
} else if (y <= -1.7e-196) {
tmp = x;
} else if (y <= 2.4e+61) {
tmp = t * -a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * -y tmp = 0 if y <= -1.25e-36: tmp = t_1 elif y <= -1.7e-196: tmp = x elif y <= 2.4e+61: tmp = t * -a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(-y)) tmp = 0.0 if (y <= -1.25e-36) tmp = t_1; elseif (y <= -1.7e-196) tmp = x; elseif (y <= 2.4e+61) tmp = Float64(t * Float64(-a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * -y; tmp = 0.0; if (y <= -1.25e-36) tmp = t_1; elseif (y <= -1.7e-196) tmp = x; elseif (y <= 2.4e+61) tmp = t * -a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.25e-36], t$95$1, If[LessEqual[y, -1.7e-196], x, If[LessEqual[y, 2.4e+61], N[(t * (-a)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-196}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+61}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.25000000000000001e-36 or 2.3999999999999999e61 < y Initial program 91.9%
Taylor expanded in z around inf 49.2%
Taylor expanded in y around inf 48.5%
mul-1-neg48.5%
distribute-lft-neg-out48.5%
*-commutative48.5%
Simplified48.5%
if -1.25000000000000001e-36 < y < -1.7e-196Initial program 100.0%
Taylor expanded in x around inf 36.5%
if -1.7e-196 < y < 2.3999999999999999e61Initial program 98.9%
Taylor expanded in t around inf 38.1%
Taylor expanded in b around 0 25.4%
neg-mul-125.4%
distribute-rgt-neg-in25.4%
Simplified25.4%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.9e-36) (* y b) (if (<= y -1.3e-196) x (if (<= y 8.5e+83) (* t (- a)) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.9e-36) {
tmp = y * b;
} else if (y <= -1.3e-196) {
tmp = x;
} else if (y <= 8.5e+83) {
tmp = t * -a;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.9d-36)) then
tmp = y * b
else if (y <= (-1.3d-196)) then
tmp = x
else if (y <= 8.5d+83) then
tmp = t * -a
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.9e-36) {
tmp = y * b;
} else if (y <= -1.3e-196) {
tmp = x;
} else if (y <= 8.5e+83) {
tmp = t * -a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.9e-36: tmp = y * b elif y <= -1.3e-196: tmp = x elif y <= 8.5e+83: tmp = t * -a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.9e-36) tmp = Float64(y * b); elseif (y <= -1.3e-196) tmp = x; elseif (y <= 8.5e+83) tmp = Float64(t * Float64(-a)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.9e-36) tmp = y * b; elseif (y <= -1.3e-196) tmp = x; elseif (y <= 8.5e+83) tmp = t * -a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.9e-36], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.3e-196], x, If[LessEqual[y, 8.5e+83], N[(t * (-a)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-36}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-196}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+83}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.89999999999999985e-36 or 8.4999999999999995e83 < y Initial program 91.7%
Taylor expanded in t around inf 50.9%
associate-*r*50.9%
neg-mul-150.9%
Simplified50.9%
Taylor expanded in y around inf 36.6%
*-commutative36.6%
Simplified36.6%
if -1.89999999999999985e-36 < y < -1.2999999999999999e-196Initial program 100.0%
Taylor expanded in x around inf 36.5%
if -1.2999999999999999e-196 < y < 8.4999999999999995e83Initial program 99.0%
Taylor expanded in t around inf 37.1%
Taylor expanded in b around 0 24.7%
neg-mul-124.7%
distribute-rgt-neg-in24.7%
Simplified24.7%
Final simplification32.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-36) (* y b) (if (<= y -6e-192) x (if (<= y 1.4e-14) z (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-36) {
tmp = y * b;
} else if (y <= -6e-192) {
tmp = x;
} else if (y <= 1.4e-14) {
tmp = z;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.7d-36)) then
tmp = y * b
else if (y <= (-6d-192)) then
tmp = x
else if (y <= 1.4d-14) then
tmp = z
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-36) {
tmp = y * b;
} else if (y <= -6e-192) {
tmp = x;
} else if (y <= 1.4e-14) {
tmp = z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-36: tmp = y * b elif y <= -6e-192: tmp = x elif y <= 1.4e-14: tmp = z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-36) tmp = Float64(y * b); elseif (y <= -6e-192) tmp = x; elseif (y <= 1.4e-14) tmp = z; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e-36) tmp = y * b; elseif (y <= -6e-192) tmp = x; elseif (y <= 1.4e-14) tmp = z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-36], N[(y * b), $MachinePrecision], If[LessEqual[y, -6e-192], x, If[LessEqual[y, 1.4e-14], z, N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-36}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-192}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-14}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.7000000000000001e-36 or 1.4e-14 < y Initial program 92.7%
Taylor expanded in t around inf 50.4%
associate-*r*50.4%
neg-mul-150.4%
Simplified50.4%
Taylor expanded in y around inf 33.4%
*-commutative33.4%
Simplified33.4%
if -1.7000000000000001e-36 < y < -5.9999999999999998e-192Initial program 100.0%
Taylor expanded in x around inf 37.4%
if -5.9999999999999998e-192 < y < 1.4e-14Initial program 98.8%
Taylor expanded in z around inf 24.4%
Taylor expanded in y around 0 24.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.4e+64) (not (<= b 1.55e+129))) (* b (- (+ y t) 2.0)) (- x (* z (+ y -1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e+64) || !(b <= 1.55e+129)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x - (z * (y + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.4d+64)) .or. (.not. (b <= 1.55d+129))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = x - (z * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e+64) || !(b <= 1.55e+129)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x - (z * (y + -1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.4e+64) or not (b <= 1.55e+129): tmp = b * ((y + t) - 2.0) else: tmp = x - (z * (y + -1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.4e+64) || !(b <= 1.55e+129)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(x - Float64(z * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.4e+64) || ~((b <= 1.55e+129))) tmp = b * ((y + t) - 2.0); else tmp = x - (z * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.4e+64], N[Not[LessEqual[b, 1.55e+129]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+64} \lor \neg \left(b \leq 1.55 \cdot 10^{+129}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if b < -3.4000000000000002e64 or 1.55e129 < b Initial program 94.0%
Taylor expanded in b around inf 81.8%
if -3.4000000000000002e64 < b < 1.55e129Initial program 96.5%
Taylor expanded in b around 0 88.3%
Taylor expanded in a around 0 62.5%
Final simplification68.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1750000000000.0) (not (<= y 3.4e+48))) (* y (- b z)) (+ z (+ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1750000000000.0) || !(y <= 3.4e+48)) {
tmp = y * (b - z);
} else {
tmp = z + (x + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1750000000000.0d0)) .or. (.not. (y <= 3.4d+48))) then
tmp = y * (b - z)
else
tmp = z + (x + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1750000000000.0) || !(y <= 3.4e+48)) {
tmp = y * (b - z);
} else {
tmp = z + (x + a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1750000000000.0) or not (y <= 3.4e+48): tmp = y * (b - z) else: tmp = z + (x + a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1750000000000.0) || !(y <= 3.4e+48)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(z + Float64(x + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1750000000000.0) || ~((y <= 3.4e+48))) tmp = y * (b - z); else tmp = z + (x + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1750000000000.0], N[Not[LessEqual[y, 3.4e+48]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1750000000000 \lor \neg \left(y \leq 3.4 \cdot 10^{+48}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + a\right)\\
\end{array}
\end{array}
if y < -1.75e12 or 3.4000000000000003e48 < y Initial program 91.8%
Taylor expanded in y around inf 77.8%
if -1.75e12 < y < 3.4000000000000003e48Initial program 99.2%
Taylor expanded in b around 0 75.4%
Taylor expanded in t around 0 56.1%
associate--r+56.1%
sub-neg56.1%
metadata-eval56.1%
sub-neg56.1%
sub-neg56.1%
mul-1-neg56.1%
remove-double-neg56.1%
distribute-rgt-neg-in56.1%
distribute-neg-in56.1%
metadata-eval56.1%
+-commutative56.1%
sub-neg56.1%
Simplified56.1%
Taylor expanded in y around 0 55.9%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.4e+45) (not (<= t 3e+38))) (* t (- b a)) (* b (- y 2.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.4e+45) || !(t <= 3e+38)) {
tmp = t * (b - a);
} else {
tmp = b * (y - 2.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.4d+45)) .or. (.not. (t <= 3d+38))) then
tmp = t * (b - a)
else
tmp = b * (y - 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.4e+45) || !(t <= 3e+38)) {
tmp = t * (b - a);
} else {
tmp = b * (y - 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.4e+45) or not (t <= 3e+38): tmp = t * (b - a) else: tmp = b * (y - 2.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.4e+45) || !(t <= 3e+38)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(b * Float64(y - 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.4e+45) || ~((t <= 3e+38))) tmp = t * (b - a); else tmp = b * (y - 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.4e+45], N[Not[LessEqual[t, 3e+38]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+45} \lor \neg \left(t \leq 3 \cdot 10^{+38}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\end{array}
\end{array}
if t < -2.39999999999999989e45 or 3.0000000000000001e38 < t Initial program 91.7%
Taylor expanded in t around inf 68.0%
if -2.39999999999999989e45 < t < 3.0000000000000001e38Initial program 98.6%
Taylor expanded in t around inf 30.9%
associate-*r*30.9%
neg-mul-130.9%
Simplified30.9%
Taylor expanded in t around 0 30.9%
Final simplification46.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1e+25) (not (<= y 1.6e+59))) (* z (- y)) (* a (- 1.0 t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1e+25) || !(y <= 1.6e+59)) {
tmp = z * -y;
} else {
tmp = a * (1.0 - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1d+25)) .or. (.not. (y <= 1.6d+59))) then
tmp = z * -y
else
tmp = a * (1.0d0 - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1e+25) || !(y <= 1.6e+59)) {
tmp = z * -y;
} else {
tmp = a * (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1e+25) or not (y <= 1.6e+59): tmp = z * -y else: tmp = a * (1.0 - t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1e+25) || !(y <= 1.6e+59)) tmp = Float64(z * Float64(-y)); else tmp = Float64(a * Float64(1.0 - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1e+25) || ~((y <= 1.6e+59))) tmp = z * -y; else tmp = a * (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e+25], N[Not[LessEqual[y, 1.6e+59]], $MachinePrecision]], N[(z * (-y)), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+25} \lor \neg \left(y \leq 1.6 \cdot 10^{+59}\right):\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if y < -1.00000000000000009e25 or 1.59999999999999991e59 < y Initial program 91.6%
Taylor expanded in z around inf 50.4%
Taylor expanded in y around inf 50.4%
mul-1-neg50.4%
distribute-lft-neg-out50.4%
*-commutative50.4%
Simplified50.4%
if -1.00000000000000009e25 < y < 1.59999999999999991e59Initial program 99.3%
Taylor expanded in a around inf 36.5%
Final simplification42.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8e+44) (not (<= t 4.9e+39))) (* t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e+44) || !(t <= 4.9e+39)) {
tmp = t * b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8d+44)) .or. (.not. (t <= 4.9d+39))) then
tmp = t * b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e+44) || !(t <= 4.9e+39)) {
tmp = t * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8e+44) or not (t <= 4.9e+39): tmp = t * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8e+44) || !(t <= 4.9e+39)) tmp = Float64(t * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8e+44) || ~((t <= 4.9e+39))) tmp = t * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8e+44], N[Not[LessEqual[t, 4.9e+39]], $MachinePrecision]], N[(t * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+44} \lor \neg \left(t \leq 4.9 \cdot 10^{+39}\right):\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -8.0000000000000007e44 or 4.89999999999999987e39 < t Initial program 91.8%
Taylor expanded in t around inf 67.4%
Taylor expanded in b around inf 37.4%
*-commutative37.4%
Simplified37.4%
if -8.0000000000000007e44 < t < 4.89999999999999987e39Initial program 98.6%
Taylor expanded in x around inf 19.2%
Final simplification27.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -0.03) x (if (<= x 1.05e+141) z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -0.03) {
tmp = x;
} else if (x <= 1.05e+141) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-0.03d0)) then
tmp = x
else if (x <= 1.05d+141) then
tmp = z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -0.03) {
tmp = x;
} else if (x <= 1.05e+141) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -0.03: tmp = x elif x <= 1.05e+141: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -0.03) tmp = x; elseif (x <= 1.05e+141) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -0.03) tmp = x; elseif (x <= 1.05e+141) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -0.03], x, If[LessEqual[x, 1.05e+141], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.03:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+141}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -0.029999999999999999 or 1.0499999999999999e141 < x Initial program 92.9%
Taylor expanded in x around inf 34.1%
if -0.029999999999999999 < x < 1.0499999999999999e141Initial program 97.5%
Taylor expanded in z around inf 41.8%
Taylor expanded in y around 0 16.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.7%
Taylor expanded in x around inf 14.8%
herbie shell --seed 2024141
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))