
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * 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) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * 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) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (- (+ x (+ y (+ z (+ (* -0.5 b) (* b a))))) (* z (log t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + (y + (z + ((-0.5 * b) + (b * a))))) - (z * log(t));
}
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 + (z + (((-0.5d0) * b) + (b * a))))) - (z * log(t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + (y + (z + ((-0.5 * b) + (b * a))))) - (z * Math.log(t));
}
def code(x, y, z, t, a, b): return (x + (y + (z + ((-0.5 * b) + (b * a))))) - (z * math.log(t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(y + Float64(z + Float64(Float64(-0.5 * b) + Float64(b * a))))) - Float64(z * log(t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + (y + (z + ((-0.5 * b) + (b * a))))) - (z * log(t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(y + N[(z + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \left(y + \left(z + \left(-0.5 \cdot b + b \cdot a\right)\right)\right)\right) - z \cdot \log t
\end{array}
Initial program 99.9%
Taylor expanded in a around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -5e+47) (not (<= t_1 2e+52)))
(+ (+ x y) t_1)
(- (+ x (+ y (+ z (* -0.5 b)))) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -5e+47) || !(t_1 <= 2e+52)) {
tmp = (x + y) + t_1;
} else {
tmp = (x + (y + (z + (-0.5 * b)))) - (z * log(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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-5d+47)) .or. (.not. (t_1 <= 2d+52))) then
tmp = (x + y) + t_1
else
tmp = (x + (y + (z + ((-0.5d0) * b)))) - (z * log(t))
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 * (a - 0.5);
double tmp;
if ((t_1 <= -5e+47) || !(t_1 <= 2e+52)) {
tmp = (x + y) + t_1;
} else {
tmp = (x + (y + (z + (-0.5 * b)))) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -5e+47) or not (t_1 <= 2e+52): tmp = (x + y) + t_1 else: tmp = (x + (y + (z + (-0.5 * b)))) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -5e+47) || !(t_1 <= 2e+52)) tmp = Float64(Float64(x + y) + t_1); else tmp = Float64(Float64(x + Float64(y + Float64(z + Float64(-0.5 * b)))) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -5e+47) || ~((t_1 <= 2e+52))) tmp = (x + y) + t_1; else tmp = (x + (y + (z + (-0.5 * b)))) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+47], N[Not[LessEqual[t$95$1, 2e+52]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(x + N[(y + N[(z + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+47} \lor \neg \left(t_1 \leq 2 \cdot 10^{+52}\right):\\
\;\;\;\;\left(x + y\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y + \left(z + -0.5 \cdot b\right)\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -5.00000000000000022e47 or 2e52 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
Taylor expanded in z around 0 91.2%
+-commutative91.2%
Simplified91.2%
if -5.00000000000000022e47 < (*.f64 (-.f64 a 1/2) b) < 2e52Initial program 99.8%
Taylor expanded in a around 0 95.0%
Final simplification93.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= (+ x y) -1e+173)
(+ (+ x y) t_1)
(if (<= (+ x y) 2e+17) (+ t_1 (- z (* z (log t)))) (+ y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= -1e+173) {
tmp = (x + y) + t_1;
} else if ((x + y) <= 2e+17) {
tmp = t_1 + (z - (z * log(t)));
} else {
tmp = 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 = b * (a - 0.5d0)
if ((x + y) <= (-1d+173)) then
tmp = (x + y) + t_1
else if ((x + y) <= 2d+17) then
tmp = t_1 + (z - (z * log(t)))
else
tmp = 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 = b * (a - 0.5);
double tmp;
if ((x + y) <= -1e+173) {
tmp = (x + y) + t_1;
} else if ((x + y) <= 2e+17) {
tmp = t_1 + (z - (z * Math.log(t)));
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -1e+173: tmp = (x + y) + t_1 elif (x + y) <= 2e+17: tmp = t_1 + (z - (z * math.log(t))) else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -1e+173) tmp = Float64(Float64(x + y) + t_1); elseif (Float64(x + y) <= 2e+17) tmp = Float64(t_1 + Float64(z - Float64(z * log(t)))); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= -1e+173) tmp = (x + y) + t_1; elseif ((x + y) <= 2e+17) tmp = t_1 + (z - (z * log(t))); else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -1e+173], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 2e+17], N[(t$95$1 + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -1 \cdot 10^{+173}:\\
\;\;\;\;\left(x + y\right) + t_1\\
\mathbf{elif}\;x + y \leq 2 \cdot 10^{+17}:\\
\;\;\;\;t_1 + \left(z - z \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < -1e173Initial program 100.0%
Taylor expanded in z around 0 97.0%
+-commutative97.0%
Simplified97.0%
if -1e173 < (+.f64 x y) < 2e17Initial program 99.8%
Taylor expanded in z around inf 88.7%
sub-neg88.7%
distribute-rgt-in88.8%
*-lft-identity88.8%
cancel-sign-sub-inv88.8%
*-commutative88.8%
Simplified88.8%
if 2e17 < (+.f64 x y) Initial program 99.8%
Taylor expanded in y around inf 45.6%
Final simplification78.6%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5));
}
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 = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * Math.log(t))) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4.8e+238)
(and (not (<= z 1.65e+181))
(or (<= z 3.3e+224) (not (<= z 3.4e+264)))))
(* z (- 1.0 (log t)))
(+ (+ x y) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e+238) || (!(z <= 1.65e+181) && ((z <= 3.3e+224) || !(z <= 3.4e+264)))) {
tmp = z * (1.0 - log(t));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
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 ((z <= (-4.8d+238)) .or. (.not. (z <= 1.65d+181)) .and. (z <= 3.3d+224) .or. (.not. (z <= 3.4d+264))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (x + y) + (b * (a - 0.5d0))
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 ((z <= -4.8e+238) || (!(z <= 1.65e+181) && ((z <= 3.3e+224) || !(z <= 3.4e+264)))) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e+238) or (not (z <= 1.65e+181) and ((z <= 3.3e+224) or not (z <= 3.4e+264))): tmp = z * (1.0 - math.log(t)) else: tmp = (x + y) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e+238) || (!(z <= 1.65e+181) && ((z <= 3.3e+224) || !(z <= 3.4e+264)))) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.8e+238) || (~((z <= 1.65e+181)) && ((z <= 3.3e+224) || ~((z <= 3.4e+264))))) tmp = z * (1.0 - log(t)); else tmp = (x + y) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e+238], And[N[Not[LessEqual[z, 1.65e+181]], $MachinePrecision], Or[LessEqual[z, 3.3e+224], N[Not[LessEqual[z, 3.4e+264]], $MachinePrecision]]]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+238} \lor \neg \left(z \leq 1.65 \cdot 10^{+181}\right) \land \left(z \leq 3.3 \cdot 10^{+224} \lor \neg \left(z \leq 3.4 \cdot 10^{+264}\right)\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -4.8e238 or 1.65000000000000008e181 < z < 3.29999999999999996e224 or 3.4000000000000001e264 < z Initial program 99.4%
Taylor expanded in a around 0 99.4%
Taylor expanded in z around inf 78.7%
if -4.8e238 < z < 1.65000000000000008e181 or 3.29999999999999996e224 < z < 3.4000000000000001e264Initial program 99.9%
Taylor expanded in z around 0 89.6%
+-commutative89.6%
Simplified89.6%
Final simplification88.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.5e-89) (not (<= b 2.85e-40))) (+ (+ x y) (* b (- a 0.5))) (- (+ x (+ y z)) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.5e-89) || !(b <= 2.85e-40)) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = (x + (y + z)) - (z * log(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 <= (-7.5d-89)) .or. (.not. (b <= 2.85d-40))) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = (x + (y + z)) - (z * log(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 <= -7.5e-89) || !(b <= 2.85e-40)) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = (x + (y + z)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.5e-89) or not (b <= 2.85e-40): tmp = (x + y) + (b * (a - 0.5)) else: tmp = (x + (y + z)) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.5e-89) || !(b <= 2.85e-40)) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(x + Float64(y + z)) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.5e-89) || ~((b <= 2.85e-40))) tmp = (x + y) + (b * (a - 0.5)); else tmp = (x + (y + z)) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.5e-89], N[Not[LessEqual[b, 2.85e-40]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{-89} \lor \neg \left(b \leq 2.85 \cdot 10^{-40}\right):\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y + z\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if b < -7.4999999999999999e-89 or 2.84999999999999992e-40 < b Initial program 99.9%
Taylor expanded in z around 0 89.2%
+-commutative89.2%
Simplified89.2%
if -7.4999999999999999e-89 < b < 2.84999999999999992e-40Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around 0 90.2%
Final simplification89.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.45e+238) (not (<= z 1.05e+148))) (+ x (* z (- 1.0 (log t)))) (+ (+ x y) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.45e+238) || !(z <= 1.05e+148)) {
tmp = x + (z * (1.0 - log(t)));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
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 ((z <= (-1.45d+238)) .or. (.not. (z <= 1.05d+148))) then
tmp = x + (z * (1.0d0 - log(t)))
else
tmp = (x + y) + (b * (a - 0.5d0))
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 ((z <= -1.45e+238) || !(z <= 1.05e+148)) {
tmp = x + (z * (1.0 - Math.log(t)));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.45e+238) or not (z <= 1.05e+148): tmp = x + (z * (1.0 - math.log(t))) else: tmp = (x + y) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.45e+238) || !(z <= 1.05e+148)) tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.45e+238) || ~((z <= 1.05e+148))) tmp = x + (z * (1.0 - log(t))); else tmp = (x + y) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.45e+238], N[Not[LessEqual[z, 1.05e+148]], $MachinePrecision]], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+238} \lor \neg \left(z \leq 1.05 \cdot 10^{+148}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -1.4500000000000001e238 or 1.04999999999999999e148 < z Initial program 99.5%
Taylor expanded in a around 0 99.5%
Taylor expanded in b around 0 83.9%
sub-neg83.9%
associate-+r+83.9%
associate-+r+83.9%
*-rgt-identity83.9%
distribute-rgt-neg-in83.9%
distribute-lft-in83.9%
sub-neg83.9%
associate-+r+83.9%
+-commutative83.9%
fma-def84.0%
Simplified84.0%
Taylor expanded in y around 0 72.6%
if -1.4500000000000001e238 < z < 1.04999999999999999e148Initial program 99.9%
Taylor expanded in z around 0 90.6%
+-commutative90.6%
Simplified90.6%
Final simplification87.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -3.2e+237)
(+ x t_1)
(if (<= z 1.66e+181) (+ (+ x y) (* b (- a 0.5))) (+ y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -3.2e+237) {
tmp = x + t_1;
} else if (z <= 1.66e+181) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = 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 = z * (1.0d0 - log(t))
if (z <= (-3.2d+237)) then
tmp = x + t_1
else if (z <= 1.66d+181) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = 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 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -3.2e+237) {
tmp = x + t_1;
} else if (z <= 1.66e+181) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -3.2e+237: tmp = x + t_1 elif z <= 1.66e+181: tmp = (x + y) + (b * (a - 0.5)) else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -3.2e+237) tmp = Float64(x + t_1); elseif (z <= 1.66e+181) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -3.2e+237) tmp = x + t_1; elseif (z <= 1.66e+181) tmp = (x + y) + (b * (a - 0.5)); else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+237], N[(x + t$95$1), $MachinePrecision], If[LessEqual[z, 1.66e+181], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+237}:\\
\;\;\;\;x + t_1\\
\mathbf{elif}\;z \leq 1.66 \cdot 10^{+181}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if z < -3.20000000000000017e237Initial program 99.3%
Taylor expanded in a around 0 99.3%
Taylor expanded in b around 0 99.3%
sub-neg99.3%
associate-+r+99.3%
associate-+r+99.3%
*-rgt-identity99.3%
distribute-rgt-neg-in99.3%
distribute-lft-in99.4%
sub-neg99.4%
associate-+r+99.4%
+-commutative99.4%
fma-def99.6%
Simplified99.6%
Taylor expanded in y around 0 94.1%
if -3.20000000000000017e237 < z < 1.6600000000000002e181Initial program 99.9%
Taylor expanded in z around 0 90.4%
+-commutative90.4%
Simplified90.4%
if 1.6600000000000002e181 < z Initial program 99.5%
Taylor expanded in a around 0 99.5%
Taylor expanded in b around 0 79.9%
sub-neg79.9%
associate-+r+79.9%
associate-+r+79.9%
*-rgt-identity79.9%
distribute-rgt-neg-in79.9%
distribute-lft-in79.9%
sub-neg79.9%
associate-+r+79.9%
+-commutative79.9%
fma-def79.9%
Simplified79.9%
Taylor expanded in x around 0 72.4%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b a))))
(if (<= (+ x y) -4e+114)
t_1
(if (<= (+ x y) -5e+40)
(+ x (* -0.5 b))
(if (<= (+ x y) -2e-48)
t_1
(if (<= (+ x y) 1e-16) (* b (- a 0.5)) (+ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * a);
double tmp;
if ((x + y) <= -4e+114) {
tmp = t_1;
} else if ((x + y) <= -5e+40) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= -2e-48) {
tmp = t_1;
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (b * a)
if ((x + y) <= (-4d+114)) then
tmp = t_1
else if ((x + y) <= (-5d+40)) then
tmp = x + ((-0.5d0) * b)
else if ((x + y) <= (-2d-48)) then
tmp = t_1
else if ((x + y) <= 1d-16) then
tmp = b * (a - 0.5d0)
else
tmp = x + y
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 + (b * a);
double tmp;
if ((x + y) <= -4e+114) {
tmp = t_1;
} else if ((x + y) <= -5e+40) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= -2e-48) {
tmp = t_1;
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * a) tmp = 0 if (x + y) <= -4e+114: tmp = t_1 elif (x + y) <= -5e+40: tmp = x + (-0.5 * b) elif (x + y) <= -2e-48: tmp = t_1 elif (x + y) <= 1e-16: tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * a)) tmp = 0.0 if (Float64(x + y) <= -4e+114) tmp = t_1; elseif (Float64(x + y) <= -5e+40) tmp = Float64(x + Float64(-0.5 * b)); elseif (Float64(x + y) <= -2e-48) tmp = t_1; elseif (Float64(x + y) <= 1e-16) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * a); tmp = 0.0; if ((x + y) <= -4e+114) tmp = t_1; elseif ((x + y) <= -5e+40) tmp = x + (-0.5 * b); elseif ((x + y) <= -2e-48) tmp = t_1; elseif ((x + y) <= 1e-16) tmp = b * (a - 0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -4e+114], t$95$1, If[LessEqual[N[(x + y), $MachinePrecision], -5e+40], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], -2e-48], t$95$1, If[LessEqual[N[(x + y), $MachinePrecision], 1e-16], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot a\\
\mathbf{if}\;x + y \leq -4 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x + y \leq -5 \cdot 10^{+40}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;x + y \leq -2 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x + y \leq 10^{-16}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (+.f64 x y) < -4e114 or -5.00000000000000003e40 < (+.f64 x y) < -1.9999999999999999e-48Initial program 99.9%
Taylor expanded in x around inf 54.0%
Taylor expanded in a around inf 46.4%
*-commutative46.4%
Simplified46.4%
if -4e114 < (+.f64 x y) < -5.00000000000000003e40Initial program 99.6%
Taylor expanded in x around inf 66.4%
Taylor expanded in a around 0 57.4%
if -1.9999999999999999e-48 < (+.f64 x y) < 9.9999999999999998e-17Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 67.5%
if 9.9999999999999998e-17 < (+.f64 x y) Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around 0 81.2%
sub-neg81.2%
associate-+r+81.2%
associate-+r+81.2%
*-rgt-identity81.2%
distribute-rgt-neg-in81.2%
distribute-lft-in81.2%
sub-neg81.2%
associate-+r+81.2%
+-commutative81.2%
fma-def81.3%
Simplified81.3%
Taylor expanded in z around 0 63.1%
Final simplification57.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b a))))
(if (<= (+ x y) -4e+114)
t_1
(if (<= (+ x y) -5e+40)
(+ x (* -0.5 b))
(if (<= (+ x y) -2e-48)
t_1
(if (<= (+ x y) 2e-22) (* b (- a 0.5)) (+ y (* -0.5 b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * a);
double tmp;
if ((x + y) <= -4e+114) {
tmp = t_1;
} else if ((x + y) <= -5e+40) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= -2e-48) {
tmp = t_1;
} else if ((x + y) <= 2e-22) {
tmp = b * (a - 0.5);
} else {
tmp = y + (-0.5 * 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 = x + (b * a)
if ((x + y) <= (-4d+114)) then
tmp = t_1
else if ((x + y) <= (-5d+40)) then
tmp = x + ((-0.5d0) * b)
else if ((x + y) <= (-2d-48)) then
tmp = t_1
else if ((x + y) <= 2d-22) then
tmp = b * (a - 0.5d0)
else
tmp = y + ((-0.5d0) * 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 = x + (b * a);
double tmp;
if ((x + y) <= -4e+114) {
tmp = t_1;
} else if ((x + y) <= -5e+40) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= -2e-48) {
tmp = t_1;
} else if ((x + y) <= 2e-22) {
tmp = b * (a - 0.5);
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * a) tmp = 0 if (x + y) <= -4e+114: tmp = t_1 elif (x + y) <= -5e+40: tmp = x + (-0.5 * b) elif (x + y) <= -2e-48: tmp = t_1 elif (x + y) <= 2e-22: tmp = b * (a - 0.5) else: tmp = y + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * a)) tmp = 0.0 if (Float64(x + y) <= -4e+114) tmp = t_1; elseif (Float64(x + y) <= -5e+40) tmp = Float64(x + Float64(-0.5 * b)); elseif (Float64(x + y) <= -2e-48) tmp = t_1; elseif (Float64(x + y) <= 2e-22) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(y + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * a); tmp = 0.0; if ((x + y) <= -4e+114) tmp = t_1; elseif ((x + y) <= -5e+40) tmp = x + (-0.5 * b); elseif ((x + y) <= -2e-48) tmp = t_1; elseif ((x + y) <= 2e-22) tmp = b * (a - 0.5); else tmp = y + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -4e+114], t$95$1, If[LessEqual[N[(x + y), $MachinePrecision], -5e+40], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], -2e-48], t$95$1, If[LessEqual[N[(x + y), $MachinePrecision], 2e-22], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot a\\
\mathbf{if}\;x + y \leq -4 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x + y \leq -5 \cdot 10^{+40}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;x + y \leq -2 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x + y \leq 2 \cdot 10^{-22}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < -4e114 or -5.00000000000000003e40 < (+.f64 x y) < -1.9999999999999999e-48Initial program 99.9%
Taylor expanded in x around inf 54.0%
Taylor expanded in a around inf 46.4%
*-commutative46.4%
Simplified46.4%
if -4e114 < (+.f64 x y) < -5.00000000000000003e40Initial program 99.6%
Taylor expanded in x around inf 66.4%
Taylor expanded in a around 0 57.4%
if -1.9999999999999999e-48 < (+.f64 x y) < 2.0000000000000001e-22Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 67.0%
if 2.0000000000000001e-22 < (+.f64 x y) Initial program 99.8%
Taylor expanded in y around inf 45.6%
Taylor expanded in a around 0 34.1%
Final simplification48.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b a))))
(if (<= (+ x y) -4e+114)
t_1
(if (<= (+ x y) -5e+40)
(+ x (* -0.5 b))
(if (<= (+ x y) -2e-48)
t_1
(if (<= (+ x y) 1e-16) (* b (- a 0.5)) (+ y (* b a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * a);
double tmp;
if ((x + y) <= -4e+114) {
tmp = t_1;
} else if ((x + y) <= -5e+40) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= -2e-48) {
tmp = t_1;
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = y + (b * 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) :: t_1
real(8) :: tmp
t_1 = x + (b * a)
if ((x + y) <= (-4d+114)) then
tmp = t_1
else if ((x + y) <= (-5d+40)) then
tmp = x + ((-0.5d0) * b)
else if ((x + y) <= (-2d-48)) then
tmp = t_1
else if ((x + y) <= 1d-16) then
tmp = b * (a - 0.5d0)
else
tmp = y + (b * a)
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 + (b * a);
double tmp;
if ((x + y) <= -4e+114) {
tmp = t_1;
} else if ((x + y) <= -5e+40) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= -2e-48) {
tmp = t_1;
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = y + (b * a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * a) tmp = 0 if (x + y) <= -4e+114: tmp = t_1 elif (x + y) <= -5e+40: tmp = x + (-0.5 * b) elif (x + y) <= -2e-48: tmp = t_1 elif (x + y) <= 1e-16: tmp = b * (a - 0.5) else: tmp = y + (b * a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * a)) tmp = 0.0 if (Float64(x + y) <= -4e+114) tmp = t_1; elseif (Float64(x + y) <= -5e+40) tmp = Float64(x + Float64(-0.5 * b)); elseif (Float64(x + y) <= -2e-48) tmp = t_1; elseif (Float64(x + y) <= 1e-16) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(y + Float64(b * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * a); tmp = 0.0; if ((x + y) <= -4e+114) tmp = t_1; elseif ((x + y) <= -5e+40) tmp = x + (-0.5 * b); elseif ((x + y) <= -2e-48) tmp = t_1; elseif ((x + y) <= 1e-16) tmp = b * (a - 0.5); else tmp = y + (b * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -4e+114], t$95$1, If[LessEqual[N[(x + y), $MachinePrecision], -5e+40], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], -2e-48], t$95$1, If[LessEqual[N[(x + y), $MachinePrecision], 1e-16], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(b * a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot a\\
\mathbf{if}\;x + y \leq -4 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x + y \leq -5 \cdot 10^{+40}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;x + y \leq -2 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x + y \leq 10^{-16}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + b \cdot a\\
\end{array}
\end{array}
if (+.f64 x y) < -4e114 or -5.00000000000000003e40 < (+.f64 x y) < -1.9999999999999999e-48Initial program 99.9%
Taylor expanded in x around inf 54.0%
Taylor expanded in a around inf 46.4%
*-commutative46.4%
Simplified46.4%
if -4e114 < (+.f64 x y) < -5.00000000000000003e40Initial program 99.6%
Taylor expanded in x around inf 66.4%
Taylor expanded in a around 0 57.4%
if -1.9999999999999999e-48 < (+.f64 x y) < 9.9999999999999998e-17Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 67.5%
if 9.9999999999999998e-17 < (+.f64 x y) Initial program 99.8%
Taylor expanded in y around inf 44.9%
Taylor expanded in a around inf 37.9%
*-commutative49.3%
Simplified37.9%
Final simplification49.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -5e+181) (+ x y) (if (<= (+ x y) 1e-16) (* b (- a 0.5)) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -5e+181) {
tmp = x + y;
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x + y) <= (-5d+181)) then
tmp = x + y
else if ((x + y) <= 1d-16) then
tmp = b * (a - 0.5d0)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -5e+181) {
tmp = x + y;
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= -5e+181: tmp = x + y elif (x + y) <= 1e-16: tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -5e+181) tmp = Float64(x + y); elseif (Float64(x + y) <= 1e-16) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= -5e+181) tmp = x + y; elseif ((x + y) <= 1e-16) tmp = b * (a - 0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -5e+181], N[(x + y), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e-16], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -5 \cdot 10^{+181}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x + y \leq 10^{-16}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (+.f64 x y) < -5.0000000000000003e181 or 9.9999999999999998e-17 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around 0 80.8%
sub-neg80.8%
associate-+r+80.8%
associate-+r+80.8%
*-rgt-identity80.8%
distribute-rgt-neg-in80.8%
distribute-lft-in80.9%
sub-neg80.9%
associate-+r+80.9%
+-commutative80.9%
fma-def80.9%
Simplified80.9%
Taylor expanded in z around 0 70.0%
if -5.0000000000000003e181 < (+.f64 x y) < 9.9999999999999998e-17Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around inf 59.4%
Final simplification65.2%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -1e+173) (+ x (* -0.5 b)) (if (<= (+ x y) 1e-16) (* b (- a 0.5)) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -1e+173) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x + y) <= (-1d+173)) then
tmp = x + ((-0.5d0) * b)
else if ((x + y) <= 1d-16) then
tmp = b * (a - 0.5d0)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -1e+173) {
tmp = x + (-0.5 * b);
} else if ((x + y) <= 1e-16) {
tmp = b * (a - 0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= -1e+173: tmp = x + (-0.5 * b) elif (x + y) <= 1e-16: tmp = b * (a - 0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -1e+173) tmp = Float64(x + Float64(-0.5 * b)); elseif (Float64(x + y) <= 1e-16) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= -1e+173) tmp = x + (-0.5 * b); elseif ((x + y) <= 1e-16) tmp = b * (a - 0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -1e+173], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e-16], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -1 \cdot 10^{+173}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;x + y \leq 10^{-16}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (+.f64 x y) < -1e173Initial program 100.0%
Taylor expanded in x around inf 50.8%
Taylor expanded in a around 0 38.1%
if -1e173 < (+.f64 x y) < 9.9999999999999998e-17Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around inf 59.9%
if 9.9999999999999998e-17 < (+.f64 x y) Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around 0 81.2%
sub-neg81.2%
associate-+r+81.2%
associate-+r+81.2%
*-rgt-identity81.2%
distribute-rgt-neg-in81.2%
distribute-lft-in81.2%
sub-neg81.2%
associate-+r+81.2%
+-commutative81.2%
fma-def81.3%
Simplified81.3%
Taylor expanded in z around 0 63.1%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e-81) (+ x (+ (* -0.5 b) (* b a))) (+ y (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e-81) {
tmp = x + ((-0.5 * b) + (b * a));
} else {
tmp = y + (b * (a - 0.5));
}
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 + y) <= 1d-81) then
tmp = x + (((-0.5d0) * b) + (b * a))
else
tmp = y + (b * (a - 0.5d0))
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 + y) <= 1e-81) {
tmp = x + ((-0.5 * b) + (b * a));
} else {
tmp = y + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 1e-81: tmp = x + ((-0.5 * b) + (b * a)) else: tmp = y + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 1e-81) tmp = Float64(x + Float64(Float64(-0.5 * b) + Float64(b * a))); else tmp = Float64(y + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= 1e-81) tmp = x + ((-0.5 * b) + (b * a)); else tmp = y + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 1e-81], N[(x + N[(N[(-0.5 * b), $MachinePrecision] + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 10^{-81}:\\
\;\;\;\;x + \left(-0.5 \cdot b + b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;y + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999996e-82Initial program 99.9%
Taylor expanded in x around inf 58.0%
*-commutative58.0%
sub-neg58.0%
distribute-lft-in58.1%
metadata-eval58.1%
Applied egg-rr58.1%
if 9.9999999999999996e-82 < (+.f64 x y) Initial program 99.8%
Taylor expanded in y around inf 50.5%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -2e+169) (+ x y) (if (<= (+ x y) 2e-22) (* b a) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -2e+169) {
tmp = x + y;
} else if ((x + y) <= 2e-22) {
tmp = b * a;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((x + y) <= (-2d+169)) then
tmp = x + y
else if ((x + y) <= 2d-22) then
tmp = b * a
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -2e+169) {
tmp = x + y;
} else if ((x + y) <= 2e-22) {
tmp = b * a;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= -2e+169: tmp = x + y elif (x + y) <= 2e-22: tmp = b * a else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -2e+169) tmp = Float64(x + y); elseif (Float64(x + y) <= 2e-22) tmp = Float64(b * a); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= -2e+169) tmp = x + y; elseif ((x + y) <= 2e-22) tmp = b * a; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -2e+169], N[(x + y), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 2e-22], N[(b * a), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{+169}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x + y \leq 2 \cdot 10^{-22}:\\
\;\;\;\;b \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (+.f64 x y) < -1.99999999999999987e169 or 2.0000000000000001e-22 < (+.f64 x y) Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around 0 78.9%
sub-neg78.9%
associate-+r+78.9%
associate-+r+78.9%
*-rgt-identity78.9%
distribute-rgt-neg-in78.9%
distribute-lft-in78.9%
sub-neg78.9%
associate-+r+78.9%
+-commutative78.9%
fma-def78.9%
Simplified78.9%
Taylor expanded in z around 0 67.8%
if -1.99999999999999987e169 < (+.f64 x y) < 2.0000000000000001e-22Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in a around inf 41.3%
*-commutative41.3%
Simplified41.3%
Final simplification56.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e-16) (+ x (* b (- a 0.5))) (+ y (* b a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= 1e-16) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (b * 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 ((x + y) <= 1d-16) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + (b * 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 ((x + y) <= 1e-16) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (b * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 1e-16: tmp = x + (b * (a - 0.5)) else: tmp = y + (b * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= 1e-16) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + Float64(b * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x + y) <= 1e-16) tmp = x + (b * (a - 0.5)); else tmp = y + (b * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], 1e-16], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(b * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq 10^{-16}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + b \cdot a\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999998e-17Initial program 99.9%
Taylor expanded in x around inf 60.0%
if 9.9999999999999998e-17 < (+.f64 x y) Initial program 99.8%
Taylor expanded in y around inf 44.9%
Taylor expanded in a around inf 37.9%
*-commutative49.3%
Simplified37.9%
Final simplification53.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) 1e-81) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= 1e-81) {
tmp = x + t_1;
} else {
tmp = 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 = b * (a - 0.5d0)
if ((x + y) <= 1d-81) then
tmp = x + t_1
else
tmp = 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 = b * (a - 0.5);
double tmp;
if ((x + y) <= 1e-81) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= 1e-81: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= 1e-81) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((x + y) <= 1e-81) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], 1e-81], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq 10^{-81}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999996e-82Initial program 99.9%
Taylor expanded in x around inf 58.0%
if 9.9999999999999996e-82 < (+.f64 x y) Initial program 99.8%
Taylor expanded in y around inf 50.5%
Final simplification55.3%
(FPCore (x y z t a b) :precision binary64 (+ (+ x y) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * (a - 0.5));
}
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) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (x + y) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + y) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
Taylor expanded in z around 0 79.7%
+-commutative79.7%
Simplified79.7%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9.2e-275) x (if (<= y 3700000.0) (* b a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.2e-275) {
tmp = x;
} else if (y <= 3700000.0) {
tmp = b * a;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-9.2d-275)) then
tmp = x
else if (y <= 3700000.0d0) then
tmp = b * a
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.2e-275) {
tmp = x;
} else if (y <= 3700000.0) {
tmp = b * a;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9.2e-275: tmp = x elif y <= 3700000.0: tmp = b * a else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9.2e-275) tmp = x; elseif (y <= 3700000.0) tmp = Float64(b * a); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9.2e-275) tmp = x; elseif (y <= 3700000.0) tmp = b * a; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.2e-275], x, If[LessEqual[y, 3700000.0], N[(b * a), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-275}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3700000:\\
\;\;\;\;b \cdot a\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -9.19999999999999959e-275Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in x around inf 25.9%
if -9.19999999999999959e-275 < y < 3.7e6Initial program 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in a around inf 36.2%
*-commutative36.2%
Simplified36.2%
if 3.7e6 < y Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in y around inf 47.3%
Final simplification32.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8.4e+71) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.4e+71) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-8.4d+71)) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.4e+71) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.4e+71: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.4e+71) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -8.4e+71) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.4e+71], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -8.39999999999999957e71Initial program 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in x around inf 47.1%
if -8.39999999999999957e71 < x Initial program 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in y around inf 25.3%
Final simplification29.3%
(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 99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in x around inf 22.9%
Final simplification22.9%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * 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 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2023271
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))