
(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 20 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 (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY)
t_1
(*
z
(+
(+ 1.0 (+ (/ x z) (* b (/ (+ y (+ t -2.0)) z))))
(- (* a (/ (- 1.0 t) z)) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * ((1.0 + ((x / z) + (b * ((y + (t + -2.0)) / z)))) + ((a * ((1.0 - t) / z)) - y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * ((1.0 + ((x / z) + (b * ((y + (t + -2.0)) / z)))) + ((a * ((1.0 - t) / z)) - y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * ((1.0 + ((x / z) + (b * ((y + (t + -2.0)) / z)))) + ((a * ((1.0 - t) / z)) - y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + 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(z * Float64(Float64(1.0 + Float64(Float64(x / z) + Float64(b * Float64(Float64(y + Float64(t + -2.0)) / z)))) + Float64(Float64(a * Float64(Float64(1.0 - t) / z)) - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * ((1.0 + ((x / z) + (b * ((y + (t + -2.0)) / z)))) + ((a * ((1.0 - t) / z)) - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $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[(z * N[(N[(1.0 + N[(N[(x / z), $MachinePrecision] + N[(b * N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(N[(1.0 - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\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}:\\
\;\;\;\;z \cdot \left(\left(1 + \left(\frac{x}{z} + b \cdot \frac{y + \left(t + -2\right)}{z}\right)\right) + \left(a \cdot \frac{1 - t}{z} - y\right)\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 z around inf 28.6%
associate-/l*64.3%
sub-neg64.3%
+-commutative64.3%
metadata-eval64.3%
associate-+r+64.3%
sub-neg64.3%
metadata-eval64.3%
associate-/l*71.4%
+-commutative71.4%
Simplified71.4%
Final simplification98.4%
(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 94.5%
+-commutative94.5%
fma-define96.9%
associate--l+96.9%
sub-neg96.9%
metadata-eval96.9%
sub-neg96.9%
associate-+l-96.9%
fma-neg97.2%
sub-neg97.2%
metadata-eval97.2%
remove-double-neg97.2%
sub-neg97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* 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 * (1.0 - y))) + (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 * (1.0 - y))) + (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 * (1.0 - y))) + (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(1.0 - y))) + 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 * (1.0 - y))) + (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[(1.0 - y), $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(1 - y\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 65.2%
Final simplification98.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.35e+74) (not (<= b 1.42e-19))) (+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t))) (+ x (- (* z (- 1.0 y)) (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.35e+74) || !(b <= 1.42e-19)) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else {
tmp = x + ((z * (1.0 - y)) - (a * (t + -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 <= (-1.35d+74)) .or. (.not. (b <= 1.42d-19))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + (a * (1.0d0 - t))
else
tmp = x + ((z * (1.0d0 - y)) - (a * (t + (-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 <= -1.35e+74) || !(b <= 1.42e-19)) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else {
tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.35e+74) or not (b <= 1.42e-19): tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)) else: tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.35e+74) || !(b <= 1.42e-19)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(a * Float64(1.0 - t))); else tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) - Float64(a * Float64(t + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.35e+74) || ~((b <= 1.42e-19))) tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)); else tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.35e+74], N[Not[LessEqual[b, 1.42e-19]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{+74} \lor \neg \left(b \leq 1.42 \cdot 10^{-19}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) - a \cdot \left(t + -1\right)\right)\\
\end{array}
\end{array}
if b < -1.3499999999999999e74 or 1.42e-19 < b Initial program 88.5%
Taylor expanded in z around 0 87.7%
if -1.3499999999999999e74 < b < 1.42e-19Initial program 98.7%
Taylor expanded in b around 0 88.4%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.9e+96)
(+ z (+ x (+ (* y (- b z)) (* b (- t 2.0)))))
(if (<= b 1.62e-19)
(+ x (- (* z (- 1.0 y)) (* a (+ t -1.0))))
(+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.9e+96) {
tmp = z + (x + ((y * (b - z)) + (b * (t - 2.0))));
} else if (b <= 1.62e-19) {
tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0)));
} else {
tmp = (x + (b * ((y + t) - 2.0))) + (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 <= (-6.9d+96)) then
tmp = z + (x + ((y * (b - z)) + (b * (t - 2.0d0))))
else if (b <= 1.62d-19) then
tmp = x + ((z * (1.0d0 - y)) - (a * (t + (-1.0d0))))
else
tmp = (x + (b * ((y + t) - 2.0d0))) + (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 <= -6.9e+96) {
tmp = z + (x + ((y * (b - z)) + (b * (t - 2.0))));
} else if (b <= 1.62e-19) {
tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0)));
} else {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.9e+96: tmp = z + (x + ((y * (b - z)) + (b * (t - 2.0)))) elif b <= 1.62e-19: tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0))) else: tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.9e+96) tmp = Float64(z + Float64(x + Float64(Float64(y * Float64(b - z)) + Float64(b * Float64(t - 2.0))))); elseif (b <= 1.62e-19) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) - Float64(a * Float64(t + -1.0)))); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + 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 <= -6.9e+96) tmp = z + (x + ((y * (b - z)) + (b * (t - 2.0)))); elseif (b <= 1.62e-19) tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0))); else tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.9e+96], N[(z + N[(x + N[(N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision] + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.62e-19], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.9 \cdot 10^{+96}:\\
\;\;\;\;z + \left(x + \left(y \cdot \left(b - z\right) + b \cdot \left(t - 2\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.62 \cdot 10^{-19}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) - a \cdot \left(t + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -6.89999999999999998e96Initial program 86.8%
Taylor expanded in y around 0 92.0%
Taylor expanded in a around 0 92.0%
if -6.89999999999999998e96 < b < 1.62000000000000009e-19Initial program 98.7%
Taylor expanded in b around 0 88.2%
if 1.62000000000000009e-19 < b Initial program 88.5%
Taylor expanded in z around 0 87.0%
Final simplification88.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.8e+97) (not (<= b 26500000.0))) (+ x (* b (- (+ y t) 2.0))) (+ x (- (* z (- 1.0 y)) (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.8e+97) || !(b <= 26500000.0)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((z * (1.0 - y)) - (a * (t + -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.8d+97)) .or. (.not. (b <= 26500000.0d0))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + ((z * (1.0d0 - y)) - (a * (t + (-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.8e+97) || !(b <= 26500000.0)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.8e+97) or not (b <= 26500000.0): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.8e+97) || !(b <= 26500000.0)) 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(t + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.8e+97) || ~((b <= 26500000.0))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + ((z * (1.0 - y)) - (a * (t + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.8e+97], N[Not[LessEqual[b, 26500000.0]], $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[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{+97} \lor \neg \left(b \leq 26500000\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) - a \cdot \left(t + -1\right)\right)\\
\end{array}
\end{array}
if b < -3.80000000000000036e97 or 2.65e7 < b Initial program 87.5%
Taylor expanded in z around 0 86.5%
Taylor expanded in a around 0 82.9%
if -3.80000000000000036e97 < b < 2.65e7Initial program 98.7%
Taylor expanded in b around 0 88.5%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -560000.0)
t_1
(if (<= t -1.1e-172)
(+ x a)
(if (<= t 16500000000.0) (+ x (* b (+ y -2.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -560000.0) {
tmp = t_1;
} else if (t <= -1.1e-172) {
tmp = x + a;
} else if (t <= 16500000000.0) {
tmp = x + (b * (y + -2.0));
} 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 = t * (b - a)
if (t <= (-560000.0d0)) then
tmp = t_1
else if (t <= (-1.1d-172)) then
tmp = x + a
else if (t <= 16500000000.0d0) then
tmp = x + (b * (y + (-2.0d0)))
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 = t * (b - a);
double tmp;
if (t <= -560000.0) {
tmp = t_1;
} else if (t <= -1.1e-172) {
tmp = x + a;
} else if (t <= 16500000000.0) {
tmp = x + (b * (y + -2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -560000.0: tmp = t_1 elif t <= -1.1e-172: tmp = x + a elif t <= 16500000000.0: tmp = x + (b * (y + -2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -560000.0) tmp = t_1; elseif (t <= -1.1e-172) tmp = Float64(x + a); elseif (t <= 16500000000.0) tmp = Float64(x + Float64(b * Float64(y + -2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -560000.0) tmp = t_1; elseif (t <= -1.1e-172) tmp = x + a; elseif (t <= 16500000000.0) tmp = x + (b * (y + -2.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -560000.0], t$95$1, If[LessEqual[t, -1.1e-172], N[(x + a), $MachinePrecision], If[LessEqual[t, 16500000000.0], N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -560000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-172}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 16500000000:\\
\;\;\;\;x + b \cdot \left(y + -2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.6e5 or 1.65e10 < t Initial program 91.8%
Taylor expanded in t around inf 62.9%
if -5.6e5 < t < -1.10000000000000004e-172Initial program 100.0%
Taylor expanded in z around 0 67.2%
Taylor expanded in b around 0 47.7%
Taylor expanded in t around 0 47.7%
cancel-sign-sub-inv47.7%
metadata-eval47.7%
*-lft-identity47.7%
Simplified47.7%
if -1.10000000000000004e-172 < t < 1.65e10Initial program 96.0%
Taylor expanded in z around 0 70.7%
Taylor expanded in a around 0 53.3%
Taylor expanded in t around 0 52.9%
+-commutative52.9%
sub-neg52.9%
metadata-eval52.9%
Simplified52.9%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1360000.0) (not (<= t 7500000000.0))) (- (* b (- (+ y t) 2.0)) (* t a)) (+ a (+ x (* b (+ y -2.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1360000.0) || !(t <= 7500000000.0)) {
tmp = (b * ((y + t) - 2.0)) - (t * a);
} else {
tmp = a + (x + (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 <= (-1360000.0d0)) .or. (.not. (t <= 7500000000.0d0))) then
tmp = (b * ((y + t) - 2.0d0)) - (t * a)
else
tmp = a + (x + (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 <= -1360000.0) || !(t <= 7500000000.0)) {
tmp = (b * ((y + t) - 2.0)) - (t * a);
} else {
tmp = a + (x + (b * (y + -2.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1360000.0) or not (t <= 7500000000.0): tmp = (b * ((y + t) - 2.0)) - (t * a) else: tmp = a + (x + (b * (y + -2.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1360000.0) || !(t <= 7500000000.0)) tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(t * a)); else tmp = Float64(a + Float64(x + 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 <= -1360000.0) || ~((t <= 7500000000.0))) tmp = (b * ((y + t) - 2.0)) - (t * a); else tmp = a + (x + (b * (y + -2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1360000.0], N[Not[LessEqual[t, 7500000000.0]], $MachinePrecision]], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision], N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1360000 \lor \neg \left(t \leq 7500000000\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\
\mathbf{else}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\
\end{array}
\end{array}
if t < -1.36e6 or 7.5e9 < t Initial program 91.8%
Taylor expanded in t around inf 66.5%
associate-*r*66.5%
neg-mul-166.5%
Simplified66.5%
if -1.36e6 < t < 7.5e9Initial program 97.0%
Taylor expanded in z around 0 69.9%
Taylor expanded in t around 0 68.8%
+-commutative68.8%
sub-neg68.8%
metadata-eval68.8%
neg-mul-168.8%
Simplified68.8%
Final simplification67.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -560000000000.0)
t_1
(if (<= y -1.5e-92) (* a (- 1.0 t)) (if (<= y 72.0) (+ x (* t b)) 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 <= -560000000000.0) {
tmp = t_1;
} else if (y <= -1.5e-92) {
tmp = a * (1.0 - t);
} else if (y <= 72.0) {
tmp = x + (t * b);
} 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 <= (-560000000000.0d0)) then
tmp = t_1
else if (y <= (-1.5d-92)) then
tmp = a * (1.0d0 - t)
else if (y <= 72.0d0) then
tmp = x + (t * b)
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 <= -560000000000.0) {
tmp = t_1;
} else if (y <= -1.5e-92) {
tmp = a * (1.0 - t);
} else if (y <= 72.0) {
tmp = x + (t * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -560000000000.0: tmp = t_1 elif y <= -1.5e-92: tmp = a * (1.0 - t) elif y <= 72.0: tmp = x + (t * b) 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 <= -560000000000.0) tmp = t_1; elseif (y <= -1.5e-92) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 72.0) tmp = Float64(x + Float64(t * b)); 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 <= -560000000000.0) tmp = t_1; elseif (y <= -1.5e-92) tmp = a * (1.0 - t); elseif (y <= 72.0) tmp = x + (t * b); 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, -560000000000.0], t$95$1, If[LessEqual[y, -1.5e-92], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 72.0], N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -560000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-92}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 72:\\
\;\;\;\;x + t \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.6e11 or 72 < y Initial program 89.0%
Taylor expanded in y around inf 63.2%
if -5.6e11 < y < -1.50000000000000007e-92Initial program 100.0%
Taylor expanded in a around inf 56.2%
if -1.50000000000000007e-92 < y < 72Initial program 99.0%
Taylor expanded in z around 0 82.3%
Taylor expanded in a around 0 62.0%
Taylor expanded in t around inf 46.8%
Final simplification55.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -2.4e+117)
t_1
(if (<= a -2.7e-189)
(* y (- z))
(if (<= a 7.2e-42) (* b (- y 2.0)) 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 (a <= -2.4e+117) {
tmp = t_1;
} else if (a <= -2.7e-189) {
tmp = y * -z;
} else if (a <= 7.2e-42) {
tmp = b * (y - 2.0);
} 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 = a * (1.0d0 - t)
if (a <= (-2.4d+117)) then
tmp = t_1
else if (a <= (-2.7d-189)) then
tmp = y * -z
else if (a <= 7.2d-42) then
tmp = b * (y - 2.0d0)
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 = a * (1.0 - t);
double tmp;
if (a <= -2.4e+117) {
tmp = t_1;
} else if (a <= -2.7e-189) {
tmp = y * -z;
} else if (a <= 7.2e-42) {
tmp = b * (y - 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if a <= -2.4e+117: tmp = t_1 elif a <= -2.7e-189: tmp = y * -z elif a <= 7.2e-42: tmp = b * (y - 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (a <= -2.4e+117) tmp = t_1; elseif (a <= -2.7e-189) tmp = Float64(y * Float64(-z)); elseif (a <= 7.2e-42) tmp = Float64(b * Float64(y - 2.0)); else tmp = 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 (a <= -2.4e+117) tmp = t_1; elseif (a <= -2.7e-189) tmp = y * -z; elseif (a <= 7.2e-42) tmp = b * (y - 2.0); else tmp = 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[LessEqual[a, -2.4e+117], t$95$1, If[LessEqual[a, -2.7e-189], N[(y * (-z)), $MachinePrecision], If[LessEqual[a, 7.2e-42], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -2.4 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-189}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-42}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.3999999999999999e117 or 7.2000000000000004e-42 < a Initial program 93.1%
Taylor expanded in a around inf 56.6%
if -2.3999999999999999e117 < a < -2.6999999999999999e-189Initial program 93.2%
Taylor expanded in y around inf 35.7%
Taylor expanded in b around 0 26.8%
mul-1-neg26.8%
*-commutative26.8%
distribute-rgt-neg-in26.8%
Simplified26.8%
if -2.6999999999999999e-189 < a < 7.2000000000000004e-42Initial program 97.5%
Taylor expanded in t around inf 56.4%
associate-*r*56.4%
neg-mul-156.4%
Simplified56.4%
Taylor expanded in t around 0 39.6%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.2e+80) (not (<= b 25.5))) (+ x (* b (- (+ y t) 2.0))) (+ x (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.2e+80) || !(b <= 25.5)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + (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 <= (-8.2d+80)) .or. (.not. (b <= 25.5d0))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + (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 <= -8.2e+80) || !(b <= 25.5)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.2e+80) or not (b <= 25.5): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.2e+80) || !(b <= 25.5)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + 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 <= -8.2e+80) || ~((b <= 25.5))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.2e+80], N[Not[LessEqual[b, 25.5]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+80} \lor \neg \left(b \leq 25.5\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -8.20000000000000003e80 or 25.5 < b Initial program 88.0%
Taylor expanded in z around 0 87.0%
Taylor expanded in a around 0 82.7%
if -8.20000000000000003e80 < b < 25.5Initial program 98.7%
Taylor expanded in z around 0 65.8%
Taylor expanded in b around 0 55.9%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.6e+93) (not (<= b 4.5e+30))) (* b (- (+ y t) 2.0)) (+ x (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.6e+93) || !(b <= 4.5e+30)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x + (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 <= (-6.6d+93)) .or. (.not. (b <= 4.5d+30))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = x + (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 <= -6.6e+93) || !(b <= 4.5e+30)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.6e+93) or not (b <= 4.5e+30): tmp = b * ((y + t) - 2.0) else: tmp = x + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.6e+93) || !(b <= 4.5e+30)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(x + 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 <= -6.6e+93) || ~((b <= 4.5e+30))) tmp = b * ((y + t) - 2.0); else tmp = x + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.6e+93], N[Not[LessEqual[b, 4.5e+30]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.6 \cdot 10^{+93} \lor \neg \left(b \leq 4.5 \cdot 10^{+30}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -6.60000000000000017e93 or 4.49999999999999995e30 < b Initial program 87.1%
Taylor expanded in b around inf 75.5%
if -6.60000000000000017e93 < b < 4.49999999999999995e30Initial program 98.7%
Taylor expanded in z around 0 66.7%
Taylor expanded in b around 0 56.0%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -10500.0) (not (<= t 1050000000.0))) (* t (- b a)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -10500.0) || !(t <= 1050000000.0)) {
tmp = t * (b - a);
} else {
tmp = 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 ((t <= (-10500.0d0)) .or. (.not. (t <= 1050000000.0d0))) then
tmp = t * (b - a)
else
tmp = 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 ((t <= -10500.0) || !(t <= 1050000000.0)) {
tmp = t * (b - a);
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -10500.0) or not (t <= 1050000000.0): tmp = t * (b - a) else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -10500.0) || !(t <= 1050000000.0)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -10500.0) || ~((t <= 1050000000.0))) tmp = t * (b - a); else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -10500.0], N[Not[LessEqual[t, 1050000000.0]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -10500 \lor \neg \left(t \leq 1050000000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if t < -10500 or 1.05e9 < t Initial program 91.8%
Taylor expanded in t around inf 62.9%
if -10500 < t < 1.05e9Initial program 97.0%
Taylor expanded in z around 0 69.9%
Taylor expanded in b around 0 40.4%
Taylor expanded in t around 0 39.6%
cancel-sign-sub-inv39.6%
metadata-eval39.6%
*-lft-identity39.6%
Simplified39.6%
Final simplification50.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.6e+89) (not (<= a 1.3e+76))) (* a (- 1.0 t)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.6e+89) || !(a <= 1.3e+76)) {
tmp = a * (1.0 - t);
} else {
tmp = 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 ((a <= (-4.6d+89)) .or. (.not. (a <= 1.3d+76))) then
tmp = a * (1.0d0 - t)
else
tmp = 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 ((a <= -4.6e+89) || !(a <= 1.3e+76)) {
tmp = a * (1.0 - t);
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.6e+89) or not (a <= 1.3e+76): tmp = a * (1.0 - t) else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.6e+89) || !(a <= 1.3e+76)) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.6e+89) || ~((a <= 1.3e+76))) tmp = a * (1.0 - t); else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.6e+89], N[Not[LessEqual[a, 1.3e+76]], $MachinePrecision]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+89} \lor \neg \left(a \leq 1.3 \cdot 10^{+76}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if a < -4.5999999999999998e89 or 1.3e76 < a Initial program 91.1%
Taylor expanded in a around inf 61.3%
if -4.5999999999999998e89 < a < 1.3e76Initial program 96.7%
Taylor expanded in z around 0 72.0%
Taylor expanded in b around 0 31.0%
Taylor expanded in t around 0 26.3%
cancel-sign-sub-inv26.3%
metadata-eval26.3%
*-lft-identity26.3%
Simplified26.3%
Final simplification40.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -190000000000.0) (not (<= y 9.5e+15))) (* y (- z)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -190000000000.0) || !(y <= 9.5e+15)) {
tmp = y * -z;
} else {
tmp = 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 <= (-190000000000.0d0)) .or. (.not. (y <= 9.5d+15))) then
tmp = y * -z
else
tmp = 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 <= -190000000000.0) || !(y <= 9.5e+15)) {
tmp = y * -z;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -190000000000.0) or not (y <= 9.5e+15): tmp = y * -z else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -190000000000.0) || !(y <= 9.5e+15)) tmp = Float64(y * Float64(-z)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -190000000000.0) || ~((y <= 9.5e+15))) tmp = y * -z; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -190000000000.0], N[Not[LessEqual[y, 9.5e+15]], $MachinePrecision]], N[(y * (-z)), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -190000000000 \lor \neg \left(y \leq 9.5 \cdot 10^{+15}\right):\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if y < -1.9e11 or 9.5e15 < y Initial program 88.6%
Taylor expanded in y around inf 64.6%
Taylor expanded in b around 0 39.0%
mul-1-neg39.0%
*-commutative39.0%
distribute-rgt-neg-in39.0%
Simplified39.0%
if -1.9e11 < y < 9.5e15Initial program 99.3%
Taylor expanded in z around 0 82.4%
Taylor expanded in b around 0 51.4%
Taylor expanded in t around 0 37.6%
cancel-sign-sub-inv37.6%
metadata-eval37.6%
*-lft-identity37.6%
Simplified37.6%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.46e+25) (not (<= t 3e+22))) (* t (- a)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.46e+25) || !(t <= 3e+22)) {
tmp = t * -a;
} else {
tmp = 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 ((t <= (-1.46d+25)) .or. (.not. (t <= 3d+22))) then
tmp = t * -a
else
tmp = 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 ((t <= -1.46e+25) || !(t <= 3e+22)) {
tmp = t * -a;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.46e+25) or not (t <= 3e+22): tmp = t * -a else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.46e+25) || !(t <= 3e+22)) tmp = Float64(t * Float64(-a)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.46e+25) || ~((t <= 3e+22))) tmp = t * -a; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.46e+25], N[Not[LessEqual[t, 3e+22]], $MachinePrecision]], N[(t * (-a)), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.46 \cdot 10^{+25} \lor \neg \left(t \leq 3 \cdot 10^{+22}\right):\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if t < -1.45999999999999996e25 or 3e22 < t Initial program 92.1%
Taylor expanded in z around 0 78.0%
Taylor expanded in b around 0 49.1%
Taylor expanded in t around inf 37.9%
mul-1-neg37.9%
*-commutative37.9%
distribute-rgt-neg-in37.9%
Simplified37.9%
if -1.45999999999999996e25 < t < 3e22Initial program 96.4%
Taylor expanded in z around 0 70.9%
Taylor expanded in b around 0 39.7%
Taylor expanded in t around 0 38.2%
cancel-sign-sub-inv38.2%
metadata-eval38.2%
*-lft-identity38.2%
Simplified38.2%
Final simplification38.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.5e+167) (not (<= y 8.2e+70))) (* y b) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.5e+167) || !(y <= 8.2e+70)) {
tmp = y * b;
} else {
tmp = 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 <= (-8.5d+167)) .or. (.not. (y <= 8.2d+70))) then
tmp = y * b
else
tmp = 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 <= -8.5e+167) || !(y <= 8.2e+70)) {
tmp = y * b;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.5e+167) or not (y <= 8.2e+70): tmp = y * b else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.5e+167) || !(y <= 8.2e+70)) tmp = Float64(y * b); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.5e+167) || ~((y <= 8.2e+70))) tmp = y * b; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.5e+167], N[Not[LessEqual[y, 8.2e+70]], $MachinePrecision]], N[(y * b), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+167} \lor \neg \left(y \leq 8.2 \cdot 10^{+70}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if y < -8.50000000000000007e167 or 8.2000000000000004e70 < y Initial program 85.5%
Taylor expanded in y around inf 76.1%
Taylor expanded in b around inf 39.4%
if -8.50000000000000007e167 < y < 8.2000000000000004e70Initial program 97.8%
Taylor expanded in z around 0 78.2%
Taylor expanded in b around 0 49.6%
Taylor expanded in t around 0 34.0%
cancel-sign-sub-inv34.0%
metadata-eval34.0%
*-lft-identity34.0%
Simplified34.0%
Final simplification35.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.4e+17) (not (<= y 72.0))) (* y b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.4e+17) || !(y <= 72.0)) {
tmp = y * 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 ((y <= (-3.4d+17)) .or. (.not. (y <= 72.0d0))) then
tmp = y * 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 ((y <= -3.4e+17) || !(y <= 72.0)) {
tmp = y * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.4e+17) or not (y <= 72.0): tmp = y * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.4e+17) || !(y <= 72.0)) tmp = Float64(y * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.4e+17) || ~((y <= 72.0))) tmp = y * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.4e+17], N[Not[LessEqual[y, 72.0]], $MachinePrecision]], N[(y * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+17} \lor \neg \left(y \leq 72\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.4e17 or 72 < y Initial program 88.9%
Taylor expanded in y around inf 63.0%
Taylor expanded in b around inf 30.9%
if -3.4e17 < y < 72Initial program 99.2%
Taylor expanded in x around inf 22.4%
Final simplification26.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.65e+55) x (if (<= x 210000.0) z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.65e+55) {
tmp = x;
} else if (x <= 210000.0) {
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 <= (-4.65d+55)) then
tmp = x
else if (x <= 210000.0d0) 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 <= -4.65e+55) {
tmp = x;
} else if (x <= 210000.0) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.65e+55: tmp = x elif x <= 210000.0: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.65e+55) tmp = x; elseif (x <= 210000.0) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.65e+55) tmp = x; elseif (x <= 210000.0) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.65e+55], x, If[LessEqual[x, 210000.0], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.65 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 210000:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.65000000000000018e55 or 2.1e5 < x Initial program 93.6%
Taylor expanded in x around inf 33.3%
if -4.65000000000000018e55 < x < 2.1e5Initial program 95.2%
Taylor expanded in z around inf 30.5%
Taylor expanded in y around 0 15.4%
(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 94.5%
Taylor expanded in x around inf 16.3%
herbie shell --seed 2024145
(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)))