
(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 23 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 (+ y (+ t -2.0))))
(if (<=
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))
INFINITY)
(fma t_1 b (- x (fma (+ y -1.0) z (* (+ t -1.0) a))))
(*
z
(+ 1.0 (+ (+ (/ x z) (* b (/ t_1 z))) (- (* a (/ (- 1.0 t) z)) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + -2.0);
double tmp;
if ((((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
tmp = fma(t_1, b, (x - fma((y + -1.0), z, ((t + -1.0) * a))));
} else {
tmp = z * (1.0 + (((x / z) + (b * (t_1 / z))) + ((a * ((1.0 - t) / z)) - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + -2.0)) tmp = 0.0 if (Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf) tmp = fma(t_1, b, Float64(x - fma(Float64(y + -1.0), z, Float64(Float64(t + -1.0) * a)))); else tmp = Float64(z * Float64(1.0 + Float64(Float64(Float64(x / z) + Float64(b * Float64(t_1 / z))) + Float64(Float64(a * Float64(Float64(1.0 - t) / z)) - y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 + N[(N[(N[(x / z), $MachinePrecision] + N[(b * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(N[(1.0 - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + -2\right)\\
\mathbf{if}\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 + \left(\left(\frac{x}{z} + b \cdot \frac{t\_1}{z}\right) + \left(a \cdot \frac{1 - t}{z} - y\right)\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%
+-commutative100.0%
fma-define100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+l-100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.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 40.0%
associate--l+40.0%
sub-neg40.0%
metadata-eval40.0%
associate-+r+40.0%
associate-/l*60.0%
associate-+r+60.0%
metadata-eval60.0%
+-commutative60.0%
sub-neg60.0%
associate--l+60.0%
sub-neg60.0%
metadata-eval60.0%
Simplified86.7%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(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))) + (((y + t) - 2.0) * b);
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))) + (((y + t) - 2.0) * b);
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))) + (((y + t) - 2.0) * b) 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(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(1.0 + Float64(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))) + (((y + t) - 2.0) * b); 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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(1.0 + N[(N[(N[(x / z), $MachinePrecision] + N[(b * N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(N[(1.0 - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $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) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 + \left(\left(\frac{x}{z} + b \cdot \frac{y + \left(t + -2\right)}{z}\right) + \left(a \cdot \frac{1 - t}{z} - y\right)\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 40.0%
associate--l+40.0%
sub-neg40.0%
metadata-eval40.0%
associate-+r+40.0%
associate-/l*60.0%
associate-+r+60.0%
metadata-eval60.0%
+-commutative60.0%
sub-neg60.0%
associate--l+60.0%
sub-neg60.0%
metadata-eval60.0%
Simplified86.7%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(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))) + (((y + t) - 2.0) * b);
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))) + (((y + t) - 2.0) * b);
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))) + (((y + t) - 2.0) * b) 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(Float64(Float64(y + t) - 2.0) * b)) 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))) + (((y + t) - 2.0) * b); 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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $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) + \left(\left(y + t\right) - 2\right) \cdot b\\
\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 73.8%
Final simplification98.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -6.6e-7) (not (<= b 2.6e-24)))
(+ (+ x (* (- (+ y t) 2.0) b)) t_1)
(+ (+ (+ x (* z (- 1.0 y))) t_1) (* y b)))))
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 <= -6.6e-7) || !(b <= 2.6e-24)) {
tmp = (x + (((y + t) - 2.0) * b)) + t_1;
} else {
tmp = ((x + (z * (1.0 - y))) + t_1) + (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) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if ((b <= (-6.6d-7)) .or. (.not. (b <= 2.6d-24))) then
tmp = (x + (((y + t) - 2.0d0) * b)) + t_1
else
tmp = ((x + (z * (1.0d0 - y))) + t_1) + (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 t_1 = a * (1.0 - t);
double tmp;
if ((b <= -6.6e-7) || !(b <= 2.6e-24)) {
tmp = (x + (((y + t) - 2.0) * b)) + t_1;
} else {
tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if (b <= -6.6e-7) or not (b <= 2.6e-24): tmp = (x + (((y + t) - 2.0) * b)) + t_1 else: tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if ((b <= -6.6e-7) || !(b <= 2.6e-24)) tmp = Float64(Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) + t_1); else tmp = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + t_1) + Float64(y * b)); 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 <= -6.6e-7) || ~((b <= 2.6e-24))) tmp = (x + (((y + t) - 2.0) * b)) + t_1; else tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b); 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, -6.6e-7], N[Not[LessEqual[b, 2.6e-24]], $MachinePrecision]], N[(N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -6.6 \cdot 10^{-7} \lor \neg \left(b \leq 2.6 \cdot 10^{-24}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + t\_1\right) + y \cdot b\\
\end{array}
\end{array}
if b < -6.6000000000000003e-7 or 2.6e-24 < b Initial program 90.6%
Taylor expanded in z around 0 90.0%
if -6.6000000000000003e-7 < b < 2.6e-24Initial program 99.1%
Taylor expanded in y around inf 96.4%
Final simplification92.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (+ x a))) (t_2 (* t (- b a))))
(if (<= t -8.5e+41)
t_2
(if (<= t -1.1e-117)
t_1
(if (<= t 3.7e-222)
(* b (- y 2.0))
(if (<= t 12200000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (x + a);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.5e+41) {
tmp = t_2;
} else if (t <= -1.1e-117) {
tmp = t_1;
} else if (t <= 3.7e-222) {
tmp = b * (y - 2.0);
} else if (t <= 12200000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = z + (x + a)
t_2 = t * (b - a)
if (t <= (-8.5d+41)) then
tmp = t_2
else if (t <= (-1.1d-117)) then
tmp = t_1
else if (t <= 3.7d-222) then
tmp = b * (y - 2.0d0)
else if (t <= 12200000000.0d0) then
tmp = t_1
else
tmp = t_2
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 + (x + a);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.5e+41) {
tmp = t_2;
} else if (t <= -1.1e-117) {
tmp = t_1;
} else if (t <= 3.7e-222) {
tmp = b * (y - 2.0);
} else if (t <= 12200000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (x + a) t_2 = t * (b - a) tmp = 0 if t <= -8.5e+41: tmp = t_2 elif t <= -1.1e-117: tmp = t_1 elif t <= 3.7e-222: tmp = b * (y - 2.0) elif t <= 12200000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(x + a)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -8.5e+41) tmp = t_2; elseif (t <= -1.1e-117) tmp = t_1; elseif (t <= 3.7e-222) tmp = Float64(b * Float64(y - 2.0)); elseif (t <= 12200000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (x + a); t_2 = t * (b - a); tmp = 0.0; if (t <= -8.5e+41) tmp = t_2; elseif (t <= -1.1e-117) tmp = t_1; elseif (t <= 3.7e-222) tmp = b * (y - 2.0); elseif (t <= 12200000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+41], t$95$2, If[LessEqual[t, -1.1e-117], t$95$1, If[LessEqual[t, 3.7e-222], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 12200000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(x + a\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-222}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{elif}\;t \leq 12200000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.49999999999999938e41 or 1.22e10 < t Initial program 91.3%
Taylor expanded in t around inf 71.8%
if -8.49999999999999938e41 < t < -1.1000000000000001e-117 or 3.6999999999999999e-222 < t < 1.22e10Initial program 98.7%
Taylor expanded in y around inf 87.1%
Taylor expanded in y around 0 56.3%
sub-neg56.3%
neg-mul-156.3%
sub-neg56.3%
metadata-eval56.3%
distribute-neg-in56.3%
remove-double-neg56.3%
distribute-rgt-neg-in56.3%
+-commutative56.3%
distribute-neg-in56.3%
metadata-eval56.3%
sub-neg56.3%
Simplified56.3%
Taylor expanded in t around 0 54.4%
+-commutative54.4%
+-commutative54.4%
associate-+l+54.4%
Simplified54.4%
if -1.1000000000000001e-117 < t < 3.6999999999999999e-222Initial program 94.4%
Taylor expanded in t around inf 51.0%
mul-1-neg51.0%
distribute-rgt-neg-in51.0%
Simplified51.0%
Taylor expanded in t around inf 32.0%
associate-+r+32.0%
neg-mul-132.0%
sub-neg32.0%
sub-neg32.0%
metadata-eval32.0%
Simplified32.0%
Taylor expanded in t around 0 51.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -5.2e-6) (not (<= b 6.8e-47)))
(+ (+ x (* (- (+ y t) 2.0) b)) 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 <= -5.2e-6) || !(b <= 6.8e-47)) {
tmp = (x + (((y + t) - 2.0) * b)) + 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 <= (-5.2d-6)) .or. (.not. (b <= 6.8d-47))) then
tmp = (x + (((y + t) - 2.0d0) * b)) + 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 <= -5.2e-6) || !(b <= 6.8e-47)) {
tmp = (x + (((y + t) - 2.0) * b)) + 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 <= -5.2e-6) or not (b <= 6.8e-47): tmp = (x + (((y + t) - 2.0) * b)) + 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 <= -5.2e-6) || !(b <= 6.8e-47)) tmp = Float64(Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) + 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 <= -5.2e-6) || ~((b <= 6.8e-47))) tmp = (x + (((y + t) - 2.0) * b)) + 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, -5.2e-6], N[Not[LessEqual[b, 6.8e-47]], $MachinePrecision]], N[(N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $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.2 \cdot 10^{-6} \lor \neg \left(b \leq 6.8 \cdot 10^{-47}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + t\_1\right)\\
\end{array}
\end{array}
if b < -5.20000000000000019e-6 or 6.8000000000000003e-47 < b Initial program 90.8%
Taylor expanded in z around 0 89.7%
if -5.20000000000000019e-6 < b < 6.8000000000000003e-47Initial program 99.0%
Taylor expanded in b around 0 94.0%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.1e+50)
(* y b)
(if (<= y 6e-5)
(+ x z)
(if (<= y 2e+55) (* t (- a)) (if (<= y 6.2e+174) (* y (- z)) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.1e+50) {
tmp = y * b;
} else if (y <= 6e-5) {
tmp = x + z;
} else if (y <= 2e+55) {
tmp = t * -a;
} else if (y <= 6.2e+174) {
tmp = y * -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.1d+50)) then
tmp = y * b
else if (y <= 6d-5) then
tmp = x + z
else if (y <= 2d+55) then
tmp = t * -a
else if (y <= 6.2d+174) then
tmp = y * -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.1e+50) {
tmp = y * b;
} else if (y <= 6e-5) {
tmp = x + z;
} else if (y <= 2e+55) {
tmp = t * -a;
} else if (y <= 6.2e+174) {
tmp = y * -z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.1e+50: tmp = y * b elif y <= 6e-5: tmp = x + z elif y <= 2e+55: tmp = t * -a elif y <= 6.2e+174: tmp = y * -z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.1e+50) tmp = Float64(y * b); elseif (y <= 6e-5) tmp = Float64(x + z); elseif (y <= 2e+55) tmp = Float64(t * Float64(-a)); elseif (y <= 6.2e+174) tmp = Float64(y * Float64(-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.1e+50) tmp = y * b; elseif (y <= 6e-5) tmp = x + z; elseif (y <= 2e+55) tmp = t * -a; elseif (y <= 6.2e+174) tmp = y * -z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.1e+50], N[(y * b), $MachinePrecision], If[LessEqual[y, 6e-5], N[(x + z), $MachinePrecision], If[LessEqual[y, 2e+55], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, 6.2e+174], N[(y * (-z)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+50}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+55}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+174}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.10000000000000008e50 or 6.2e174 < y Initial program 88.7%
Taylor expanded in y around inf 72.9%
Taylor expanded in b around inf 50.5%
if -1.10000000000000008e50 < y < 6.00000000000000015e-5Initial program 98.6%
Taylor expanded in a around 0 73.8%
Taylor expanded in b around 0 36.7%
Taylor expanded in y around 0 36.3%
sub-neg36.3%
neg-mul-136.3%
remove-double-neg36.3%
+-commutative36.3%
Simplified36.3%
if 6.00000000000000015e-5 < y < 2.00000000000000002e55Initial program 92.9%
Taylor expanded in t around inf 78.6%
mul-1-neg78.6%
distribute-rgt-neg-in78.6%
Simplified78.6%
Taylor expanded in a around inf 57.9%
mul-1-neg57.9%
*-commutative57.9%
distribute-rgt-neg-in57.9%
Simplified57.9%
if 2.00000000000000002e55 < y < 6.2e174Initial program 83.3%
Taylor expanded in y around inf 72.3%
Taylor expanded in b around 0 50.8%
associate-*r*50.8%
mul-1-neg50.8%
Simplified50.8%
Final simplification42.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* (- (+ y t) 2.0) b))))
(if (<= b -35.0)
t_1
(if (<= b -1.55e-87)
(+ (* t b) (* z (- 1.0 y)))
(if (<= b 5.1e+67) (+ x (+ z (* a (- 1.0 t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -35.0) {
tmp = t_1;
} else if (b <= -1.55e-87) {
tmp = (t * b) + (z * (1.0 - y));
} else if (b <= 5.1e+67) {
tmp = x + (z + (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 = x + (((y + t) - 2.0d0) * b)
if (b <= (-35.0d0)) then
tmp = t_1
else if (b <= (-1.55d-87)) then
tmp = (t * b) + (z * (1.0d0 - y))
else if (b <= 5.1d+67) then
tmp = x + (z + (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 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -35.0) {
tmp = t_1;
} else if (b <= -1.55e-87) {
tmp = (t * b) + (z * (1.0 - y));
} else if (b <= 5.1e+67) {
tmp = x + (z + (a * (1.0 - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((y + t) - 2.0) * b) tmp = 0 if b <= -35.0: tmp = t_1 elif b <= -1.55e-87: tmp = (t * b) + (z * (1.0 - y)) elif b <= 5.1e+67: tmp = x + (z + (a * (1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (b <= -35.0) tmp = t_1; elseif (b <= -1.55e-87) tmp = Float64(Float64(t * b) + Float64(z * Float64(1.0 - y))); elseif (b <= 5.1e+67) tmp = Float64(x + Float64(z + 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 = x + (((y + t) - 2.0) * b); tmp = 0.0; if (b <= -35.0) tmp = t_1; elseif (b <= -1.55e-87) tmp = (t * b) + (z * (1.0 - y)); elseif (b <= 5.1e+67) tmp = x + (z + (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[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -35.0], t$95$1, If[LessEqual[b, -1.55e-87], N[(N[(t * b), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e+67], N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -35:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-87}:\\
\;\;\;\;t \cdot b + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 5.1 \cdot 10^{+67}:\\
\;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -35 or 5.1000000000000002e67 < b Initial program 89.8%
Taylor expanded in z around 0 90.4%
Taylor expanded in a around 0 86.8%
if -35 < b < -1.54999999999999999e-87Initial program 100.0%
Taylor expanded in a around 0 78.8%
Taylor expanded in t around inf 74.7%
if -1.54999999999999999e-87 < b < 5.1000000000000002e67Initial program 98.2%
Taylor expanded in y around inf 95.5%
Taylor expanded in y around 0 79.4%
sub-neg79.4%
neg-mul-179.4%
sub-neg79.4%
metadata-eval79.4%
distribute-neg-in79.4%
remove-double-neg79.4%
distribute-rgt-neg-in79.4%
+-commutative79.4%
distribute-neg-in79.4%
metadata-eval79.4%
sub-neg79.4%
Simplified79.4%
Final simplification82.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* (- (+ y t) 2.0) b))))
(if (<= b -8e-8)
t_1
(if (<= b -2.1e-89)
(+ x (* z (- 1.0 y)))
(if (<= b 2.5e+68) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -8e-8) {
tmp = t_1;
} else if (b <= -2.1e-89) {
tmp = x + (z * (1.0 - y));
} else if (b <= 2.5e+68) {
tmp = x + (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 = x + (((y + t) - 2.0d0) * b)
if (b <= (-8d-8)) then
tmp = t_1
else if (b <= (-2.1d-89)) then
tmp = x + (z * (1.0d0 - y))
else if (b <= 2.5d+68) then
tmp = x + (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 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -8e-8) {
tmp = t_1;
} else if (b <= -2.1e-89) {
tmp = x + (z * (1.0 - y));
} else if (b <= 2.5e+68) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((y + t) - 2.0) * b) tmp = 0 if b <= -8e-8: tmp = t_1 elif b <= -2.1e-89: tmp = x + (z * (1.0 - y)) elif b <= 2.5e+68: tmp = x + (a * (1.0 - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (b <= -8e-8) tmp = t_1; elseif (b <= -2.1e-89) tmp = Float64(x + Float64(z * Float64(1.0 - y))); elseif (b <= 2.5e+68) tmp = Float64(x + 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 = x + (((y + t) - 2.0) * b); tmp = 0.0; if (b <= -8e-8) tmp = t_1; elseif (b <= -2.1e-89) tmp = x + (z * (1.0 - y)); elseif (b <= 2.5e+68) tmp = x + (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[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8e-8], t$95$1, If[LessEqual[b, -2.1e-89], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e+68], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-89}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+68}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.0000000000000002e-8 or 2.5000000000000002e68 < b Initial program 90.0%
Taylor expanded in z around 0 90.6%
Taylor expanded in a around 0 86.3%
if -8.0000000000000002e-8 < b < -2.1000000000000001e-89Initial program 100.0%
Taylor expanded in a around 0 78.8%
Taylor expanded in b around 0 61.9%
if -2.1000000000000001e-89 < b < 2.5000000000000002e68Initial program 98.2%
Taylor expanded in z around 0 74.1%
Taylor expanded in b around 0 67.0%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1e-5) (not (<= b 2.7e+68))) (+ x (* (- (+ y t) 2.0) b)) (+ 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 <= -1e-5) || !(b <= 2.7e+68)) {
tmp = x + (((y + t) - 2.0) * b);
} 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 <= (-1d-5)) .or. (.not. (b <= 2.7d+68))) then
tmp = x + (((y + t) - 2.0d0) * b)
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 <= -1e-5) || !(b <= 2.7e+68)) {
tmp = x + (((y + t) - 2.0) * b);
} 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 <= -1e-5) or not (b <= 2.7e+68): tmp = x + (((y + t) - 2.0) * b) 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 <= -1e-5) || !(b <= 2.7e+68)) tmp = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)); 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 <= -1e-5) || ~((b <= 2.7e+68))) tmp = x + (((y + t) - 2.0) * b); 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, -1e-5], N[Not[LessEqual[b, 2.7e+68]], $MachinePrecision]], N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $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 -1 \cdot 10^{-5} \lor \neg \left(b \leq 2.7 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -1.00000000000000008e-5 or 2.69999999999999991e68 < b Initial program 90.0%
Taylor expanded in z around 0 90.6%
Taylor expanded in a around 0 86.3%
if -1.00000000000000008e-5 < b < 2.69999999999999991e68Initial program 98.4%
Taylor expanded in b around 0 90.4%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ y t) 2.0) b)))
(if (<= b -5.5e+16)
t_1
(if (<= b -2.75e-89)
(+ x (* z (- 1.0 y)))
(if (<= b 7.5e+72) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -5.5e+16) {
tmp = t_1;
} else if (b <= -2.75e-89) {
tmp = x + (z * (1.0 - y));
} else if (b <= 7.5e+72) {
tmp = x + (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 + t) - 2.0d0) * b
if (b <= (-5.5d+16)) then
tmp = t_1
else if (b <= (-2.75d-89)) then
tmp = x + (z * (1.0d0 - y))
else if (b <= 7.5d+72) then
tmp = x + (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 + t) - 2.0) * b;
double tmp;
if (b <= -5.5e+16) {
tmp = t_1;
} else if (b <= -2.75e-89) {
tmp = x + (z * (1.0 - y));
} else if (b <= 7.5e+72) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y + t) - 2.0) * b tmp = 0 if b <= -5.5e+16: tmp = t_1 elif b <= -2.75e-89: tmp = x + (z * (1.0 - y)) elif b <= 7.5e+72: tmp = x + (a * (1.0 - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -5.5e+16) tmp = t_1; elseif (b <= -2.75e-89) tmp = Float64(x + Float64(z * Float64(1.0 - y))); elseif (b <= 7.5e+72) tmp = Float64(x + 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 + t) - 2.0) * b; tmp = 0.0; if (b <= -5.5e+16) tmp = t_1; elseif (b <= -2.75e-89) tmp = x + (z * (1.0 - y)); elseif (b <= 7.5e+72) tmp = x + (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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.5e+16], t$95$1, If[LessEqual[b, -2.75e-89], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+72], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -5.5 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.75 \cdot 10^{-89}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+72}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.5e16 or 7.50000000000000027e72 < b Initial program 89.5%
Taylor expanded in b around inf 78.0%
if -5.5e16 < b < -2.75000000000000006e-89Initial program 100.0%
Taylor expanded in a around 0 78.3%
Taylor expanded in b around 0 59.8%
if -2.75000000000000006e-89 < b < 7.50000000000000027e72Initial program 98.2%
Taylor expanded in z around 0 74.6%
Taylor expanded in b around 0 67.5%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ y t) 2.0) b)))
(if (<= b -6.4e-6)
t_1
(if (<= b -6.5e-89)
(* z (- 1.0 y))
(if (<= b 2.8e+74) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -6.4e-6) {
tmp = t_1;
} else if (b <= -6.5e-89) {
tmp = z * (1.0 - y);
} else if (b <= 2.8e+74) {
tmp = x + (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 + t) - 2.0d0) * b
if (b <= (-6.4d-6)) then
tmp = t_1
else if (b <= (-6.5d-89)) then
tmp = z * (1.0d0 - y)
else if (b <= 2.8d+74) then
tmp = x + (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 + t) - 2.0) * b;
double tmp;
if (b <= -6.4e-6) {
tmp = t_1;
} else if (b <= -6.5e-89) {
tmp = z * (1.0 - y);
} else if (b <= 2.8e+74) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y + t) - 2.0) * b tmp = 0 if b <= -6.4e-6: tmp = t_1 elif b <= -6.5e-89: tmp = z * (1.0 - y) elif b <= 2.8e+74: tmp = x + (a * (1.0 - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -6.4e-6) tmp = t_1; elseif (b <= -6.5e-89) tmp = Float64(z * Float64(1.0 - y)); elseif (b <= 2.8e+74) tmp = Float64(x + 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 + t) - 2.0) * b; tmp = 0.0; if (b <= -6.4e-6) tmp = t_1; elseif (b <= -6.5e-89) tmp = z * (1.0 - y); elseif (b <= 2.8e+74) tmp = x + (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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6.4e-6], t$95$1, If[LessEqual[b, -6.5e-89], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+74], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -6.4 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.5 \cdot 10^{-89}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+74}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.3999999999999997e-6 or 2.80000000000000002e74 < b Initial program 89.8%
Taylor expanded in b around inf 76.5%
if -6.3999999999999997e-6 < b < -6.50000000000000034e-89Initial program 100.0%
Taylor expanded in z around inf 61.3%
if -6.50000000000000034e-89 < b < 2.80000000000000002e74Initial program 98.2%
Taylor expanded in z around 0 74.6%
Taylor expanded in b around 0 67.5%
Final simplification71.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1.85e+42)
t_1
(if (<= t -1.1e-46) (+ x z) (if (<= t 1.6e+14) (* 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 <= -1.85e+42) {
tmp = t_1;
} else if (t <= -1.1e-46) {
tmp = x + z;
} else if (t <= 1.6e+14) {
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 = t * (b - a)
if (t <= (-1.85d+42)) then
tmp = t_1
else if (t <= (-1.1d-46)) then
tmp = x + z
else if (t <= 1.6d+14) 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 = t * (b - a);
double tmp;
if (t <= -1.85e+42) {
tmp = t_1;
} else if (t <= -1.1e-46) {
tmp = x + z;
} else if (t <= 1.6e+14) {
tmp = 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 <= -1.85e+42: tmp = t_1 elif t <= -1.1e-46: tmp = x + z elif t <= 1.6e+14: tmp = 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 <= -1.85e+42) tmp = t_1; elseif (t <= -1.1e-46) tmp = Float64(x + z); elseif (t <= 1.6e+14) 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 = t * (b - a); tmp = 0.0; if (t <= -1.85e+42) tmp = t_1; elseif (t <= -1.1e-46) tmp = x + z; elseif (t <= 1.6e+14) 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[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.85e+42], t$95$1, If[LessEqual[t, -1.1e-46], N[(x + z), $MachinePrecision], If[LessEqual[t, 1.6e+14], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.85 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-46}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+14}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.84999999999999998e42 or 1.6e14 < t Initial program 91.2%
Taylor expanded in t around inf 72.3%
if -1.84999999999999998e42 < t < -1.1e-46Initial program 100.0%
Taylor expanded in a around 0 77.2%
Taylor expanded in b around 0 65.8%
Taylor expanded in y around 0 45.9%
sub-neg45.9%
neg-mul-145.9%
remove-double-neg45.9%
+-commutative45.9%
Simplified45.9%
if -1.1e-46 < t < 1.6e14Initial program 96.5%
Taylor expanded in t around inf 44.6%
mul-1-neg44.6%
distribute-rgt-neg-in44.6%
Simplified44.6%
Taylor expanded in t around inf 32.4%
associate-+r+32.4%
neg-mul-132.4%
sub-neg32.4%
sub-neg32.4%
metadata-eval32.4%
Simplified32.4%
Taylor expanded in t around 0 44.6%
Final simplification58.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- y 2.0))))
(if (<= b -1.4e+105)
t_1
(if (<= b -2.6e-6) (* t b) (if (<= b 1.15e+70) (* a (- 1.0 t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double tmp;
if (b <= -1.4e+105) {
tmp = t_1;
} else if (b <= -2.6e-6) {
tmp = t * b;
} else if (b <= 1.15e+70) {
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 = b * (y - 2.0d0)
if (b <= (-1.4d+105)) then
tmp = t_1
else if (b <= (-2.6d-6)) then
tmp = t * b
else if (b <= 1.15d+70) 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 = b * (y - 2.0);
double tmp;
if (b <= -1.4e+105) {
tmp = t_1;
} else if (b <= -2.6e-6) {
tmp = t * b;
} else if (b <= 1.15e+70) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y - 2.0) tmp = 0 if b <= -1.4e+105: tmp = t_1 elif b <= -2.6e-6: tmp = t * b elif b <= 1.15e+70: tmp = a * (1.0 - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y - 2.0)) tmp = 0.0 if (b <= -1.4e+105) tmp = t_1; elseif (b <= -2.6e-6) tmp = Float64(t * b); elseif (b <= 1.15e+70) 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 = b * (y - 2.0); tmp = 0.0; if (b <= -1.4e+105) tmp = t_1; elseif (b <= -2.6e-6) tmp = t * b; elseif (b <= 1.15e+70) 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[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e+105], t$95$1, If[LessEqual[b, -2.6e-6], N[(t * b), $MachinePrecision], If[LessEqual[b, 1.15e+70], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-6}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+70}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.4000000000000001e105 or 1.14999999999999997e70 < b Initial program 87.8%
Taylor expanded in t around inf 76.2%
mul-1-neg76.2%
distribute-rgt-neg-in76.2%
Simplified76.2%
Taylor expanded in t around inf 66.1%
associate-+r+66.1%
neg-mul-166.1%
sub-neg66.1%
sub-neg66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in t around 0 55.7%
if -1.4000000000000001e105 < b < -2.60000000000000009e-6Initial program 100.0%
Taylor expanded in t around inf 67.9%
Taylor expanded in b around inf 59.6%
if -2.60000000000000009e-6 < b < 1.14999999999999997e70Initial program 98.4%
Taylor expanded in a around inf 40.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -5.4e+34)
t_1
(if (<= a 8e-270) (+ x z) (if (<= a 540000000000.0) (* t b) 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 <= -5.4e+34) {
tmp = t_1;
} else if (a <= 8e-270) {
tmp = x + z;
} else if (a <= 540000000000.0) {
tmp = 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 = a * (1.0d0 - t)
if (a <= (-5.4d+34)) then
tmp = t_1
else if (a <= 8d-270) then
tmp = x + z
else if (a <= 540000000000.0d0) then
tmp = 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 = a * (1.0 - t);
double tmp;
if (a <= -5.4e+34) {
tmp = t_1;
} else if (a <= 8e-270) {
tmp = x + z;
} else if (a <= 540000000000.0) {
tmp = t * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if a <= -5.4e+34: tmp = t_1 elif a <= 8e-270: tmp = x + z elif a <= 540000000000.0: tmp = t * b 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 <= -5.4e+34) tmp = t_1; elseif (a <= 8e-270) tmp = Float64(x + z); elseif (a <= 540000000000.0) tmp = Float64(t * b); 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 <= -5.4e+34) tmp = t_1; elseif (a <= 8e-270) tmp = x + z; elseif (a <= 540000000000.0) tmp = t * b; 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, -5.4e+34], t$95$1, If[LessEqual[a, 8e-270], N[(x + z), $MachinePrecision], If[LessEqual[a, 540000000000.0], N[(t * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-270}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq 540000000000:\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.4000000000000001e34 or 5.4e11 < a Initial program 90.3%
Taylor expanded in a around inf 53.7%
if -5.4000000000000001e34 < a < 8.0000000000000003e-270Initial program 97.3%
Taylor expanded in a around 0 92.6%
Taylor expanded in b around 0 52.1%
Taylor expanded in y around 0 40.4%
sub-neg40.4%
neg-mul-140.4%
remove-double-neg40.4%
+-commutative40.4%
Simplified40.4%
if 8.0000000000000003e-270 < a < 5.4e11Initial program 97.0%
Taylor expanded in t around inf 40.2%
Taylor expanded in b around inf 38.6%
Final simplification45.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.4e-7) (not (<= b 3.3e+67))) (+ x (* (- (+ y t) 2.0) b)) (+ x (+ z (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.4e-7) || !(b <= 3.3e+67)) {
tmp = x + (((y + t) - 2.0) * b);
} else {
tmp = x + (z + (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 <= (-4.4d-7)) .or. (.not. (b <= 3.3d+67))) then
tmp = x + (((y + t) - 2.0d0) * b)
else
tmp = x + (z + (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 <= -4.4e-7) || !(b <= 3.3e+67)) {
tmp = x + (((y + t) - 2.0) * b);
} else {
tmp = x + (z + (a * (1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.4e-7) or not (b <= 3.3e+67): tmp = x + (((y + t) - 2.0) * b) else: tmp = x + (z + (a * (1.0 - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.4e-7) || !(b <= 3.3e+67)) tmp = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)); else tmp = Float64(x + Float64(z + 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 <= -4.4e-7) || ~((b <= 3.3e+67))) tmp = x + (((y + t) - 2.0) * b); else tmp = x + (z + (a * (1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.4e-7], N[Not[LessEqual[b, 3.3e+67]], $MachinePrecision]], N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{-7} \lor \neg \left(b \leq 3.3 \cdot 10^{+67}\right):\\
\;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -4.4000000000000002e-7 or 3.3000000000000003e67 < b Initial program 90.0%
Taylor expanded in z around 0 90.6%
Taylor expanded in a around 0 86.3%
if -4.4000000000000002e-7 < b < 3.3000000000000003e67Initial program 98.4%
Taylor expanded in y around inf 93.8%
Taylor expanded in y around 0 75.0%
sub-neg75.0%
neg-mul-175.0%
sub-neg75.0%
metadata-eval75.0%
distribute-neg-in75.0%
remove-double-neg75.0%
distribute-rgt-neg-in75.0%
+-commutative75.0%
distribute-neg-in75.0%
metadata-eval75.0%
sub-neg75.0%
Simplified75.0%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.75e-6) (not (<= b 5.1e+67))) (* (- (+ y t) 2.0) b) (+ z (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.75e-6) || !(b <= 5.1e+67)) {
tmp = ((y + t) - 2.0) * b;
} else {
tmp = z + (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 <= (-1.75d-6)) .or. (.not. (b <= 5.1d+67))) then
tmp = ((y + t) - 2.0d0) * b
else
tmp = z + (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 <= -1.75e-6) || !(b <= 5.1e+67)) {
tmp = ((y + t) - 2.0) * b;
} else {
tmp = z + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.75e-6) or not (b <= 5.1e+67): tmp = ((y + t) - 2.0) * b else: tmp = z + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.75e-6) || !(b <= 5.1e+67)) tmp = Float64(Float64(Float64(y + t) - 2.0) * b); else tmp = Float64(z + 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 <= -1.75e-6) || ~((b <= 5.1e+67))) tmp = ((y + t) - 2.0) * b; else tmp = z + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.75e-6], N[Not[LessEqual[b, 5.1e+67]], $MachinePrecision]], N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{-6} \lor \neg \left(b \leq 5.1 \cdot 10^{+67}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;z + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -1.74999999999999997e-6 or 5.1000000000000002e67 < b Initial program 90.0%
Taylor expanded in b around inf 75.4%
if -1.74999999999999997e-6 < b < 5.1000000000000002e67Initial program 98.4%
Taylor expanded in y around inf 93.8%
Taylor expanded in y around 0 75.0%
sub-neg75.0%
neg-mul-175.0%
sub-neg75.0%
metadata-eval75.0%
distribute-neg-in75.0%
remove-double-neg75.0%
distribute-rgt-neg-in75.0%
+-commutative75.0%
distribute-neg-in75.0%
metadata-eval75.0%
sub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 54.7%
Final simplification65.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.7e+15) (not (<= b 5.6e+73))) (* (- (+ y t) 2.0) b) (+ z (+ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.7e+15) || !(b <= 5.6e+73)) {
tmp = ((y + t) - 2.0) * b;
} 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 ((b <= (-2.7d+15)) .or. (.not. (b <= 5.6d+73))) then
tmp = ((y + t) - 2.0d0) * b
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 ((b <= -2.7e+15) || !(b <= 5.6e+73)) {
tmp = ((y + t) - 2.0) * b;
} else {
tmp = z + (x + a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.7e+15) or not (b <= 5.6e+73): tmp = ((y + t) - 2.0) * b else: tmp = z + (x + a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.7e+15) || !(b <= 5.6e+73)) tmp = Float64(Float64(Float64(y + t) - 2.0) * b); 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 ((b <= -2.7e+15) || ~((b <= 5.6e+73))) tmp = ((y + t) - 2.0) * b; else tmp = z + (x + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.7e+15], N[Not[LessEqual[b, 5.6e+73]], $MachinePrecision]], N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+15} \lor \neg \left(b \leq 5.6 \cdot 10^{+73}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + a\right)\\
\end{array}
\end{array}
if b < -2.7e15 or 5.60000000000000016e73 < b Initial program 89.5%
Taylor expanded in b around inf 78.0%
if -2.7e15 < b < 5.60000000000000016e73Initial program 98.5%
Taylor expanded in y around inf 93.3%
Taylor expanded in y around 0 75.4%
sub-neg75.4%
neg-mul-175.4%
sub-neg75.4%
metadata-eval75.4%
distribute-neg-in75.4%
remove-double-neg75.4%
distribute-rgt-neg-in75.4%
+-commutative75.4%
distribute-neg-in75.4%
metadata-eval75.4%
sub-neg75.4%
Simplified75.4%
Taylor expanded in t around 0 47.0%
+-commutative47.0%
+-commutative47.0%
associate-+l+47.0%
Simplified47.0%
Final simplification62.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e+51) (not (<= y 0.000105))) (* y b) (+ x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e+51) || !(y <= 0.000105)) {
tmp = y * b;
} else {
tmp = x + z;
}
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.05d+51)) .or. (.not. (y <= 0.000105d0))) then
tmp = y * b
else
tmp = x + z
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.05e+51) || !(y <= 0.000105)) {
tmp = y * b;
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e+51) or not (y <= 0.000105): tmp = y * b else: tmp = x + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e+51) || !(y <= 0.000105)) tmp = Float64(y * b); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e+51) || ~((y <= 0.000105))) tmp = y * b; else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e+51], N[Not[LessEqual[y, 0.000105]], $MachinePrecision]], N[(y * b), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+51} \lor \neg \left(y \leq 0.000105\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if y < -1.0500000000000001e51 or 1.05e-4 < y Initial program 88.4%
Taylor expanded in y around inf 69.2%
Taylor expanded in b around inf 43.5%
if -1.0500000000000001e51 < y < 1.05e-4Initial program 98.6%
Taylor expanded in a around 0 73.8%
Taylor expanded in b around 0 36.7%
Taylor expanded in y around 0 36.3%
sub-neg36.3%
neg-mul-136.3%
remove-double-neg36.3%
+-commutative36.3%
Simplified36.3%
Final simplification39.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.62e+63) (not (<= y 9.2e+16))) (* y b) (* t b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.62e+63) || !(y <= 9.2e+16)) {
tmp = y * b;
} else {
tmp = t * 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.62d+63)) .or. (.not. (y <= 9.2d+16))) then
tmp = y * b
else
tmp = t * 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.62e+63) || !(y <= 9.2e+16)) {
tmp = y * b;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.62e+63) or not (y <= 9.2e+16): tmp = y * b else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.62e+63) || !(y <= 9.2e+16)) tmp = Float64(y * b); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.62e+63) || ~((y <= 9.2e+16))) tmp = y * b; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.62e+63], N[Not[LessEqual[y, 9.2e+16]], $MachinePrecision]], N[(y * b), $MachinePrecision], N[(t * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{+63} \lor \neg \left(y \leq 9.2 \cdot 10^{+16}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if y < -1.62e63 or 9.2e16 < y Initial program 87.7%
Taylor expanded in y around inf 72.0%
Taylor expanded in b around inf 44.9%
if -1.62e63 < y < 9.2e16Initial program 98.6%
Taylor expanded in t around inf 43.9%
Taylor expanded in b around inf 26.5%
Final simplification34.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.4e+34) (not (<= t 2800000.0))) (* t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.4e+34) || !(t <= 2800000.0)) {
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 <= (-5.4d+34)) .or. (.not. (t <= 2800000.0d0))) 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 <= -5.4e+34) || !(t <= 2800000.0)) {
tmp = t * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.4e+34) or not (t <= 2800000.0): tmp = t * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.4e+34) || !(t <= 2800000.0)) 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 <= -5.4e+34) || ~((t <= 2800000.0))) tmp = t * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.4e+34], N[Not[LessEqual[t, 2800000.0]], $MachinePrecision]], N[(t * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{+34} \lor \neg \left(t \leq 2800000\right):\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -5.4000000000000001e34 or 2.8e6 < t Initial program 91.5%
Taylor expanded in t around inf 70.9%
Taylor expanded in b around inf 40.1%
if -5.4000000000000001e34 < t < 2.8e6Initial program 96.8%
Taylor expanded in x around inf 23.0%
Final simplification31.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -0.000242) x (if (<= x 7e-20) z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -0.000242) {
tmp = x;
} else if (x <= 7e-20) {
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.000242d0)) then
tmp = x
else if (x <= 7d-20) 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.000242) {
tmp = x;
} else if (x <= 7e-20) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -0.000242: tmp = x elif x <= 7e-20: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -0.000242) tmp = x; elseif (x <= 7e-20) 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.000242) tmp = x; elseif (x <= 7e-20) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -0.000242], x, If[LessEqual[x, 7e-20], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.000242:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-20}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.42e-4 or 7.00000000000000007e-20 < x Initial program 94.1%
Taylor expanded in x around inf 30.1%
if -2.42e-4 < x < 7.00000000000000007e-20Initial program 94.1%
Taylor expanded in y around inf 72.0%
Taylor expanded in y around 0 44.1%
sub-neg44.1%
neg-mul-144.1%
sub-neg44.1%
metadata-eval44.1%
distribute-neg-in44.1%
remove-double-neg44.1%
distribute-rgt-neg-in44.1%
+-commutative44.1%
distribute-neg-in44.1%
metadata-eval44.1%
sub-neg44.1%
Simplified44.1%
Taylor expanded in z around inf 14.5%
(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.1%
Taylor expanded in x around inf 17.1%
herbie shell --seed 2024116
(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)))