
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
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 * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
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 * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -5.4e+52) (not (<= z 5.8e+38)))
(+
x
(+
(* y (/ (- (/ (- t -457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))
(+
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+52) || !(z <= 5.8e+38)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + 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 ((z <= (-5.4d+52)) .or. (.not. (z <= 5.8d+38))) then
tmp = x + ((y * ((((t - (-457.9610022158428d0)) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
else
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0)) + 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 ((z <= -5.4e+52) || !(z <= 5.8e+38)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e+52) or not (z <= 5.8e+38): tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) else: tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e+52) || !(z <= 5.8e+38)) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t - -457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))); else tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e+52) || ~((z <= 5.8e+38))) tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); else tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e+52], N[Not[LessEqual[z, 5.8e+38]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t - -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+52} \lor \neg \left(z \leq 5.8 \cdot 10^{+38}\right):\\
\;\;\;\;x + \left(y \cdot \frac{\frac{t - -457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\
\end{array}
\end{array}
if z < -5.4e52 or 5.80000000000000013e38 < z Initial program 2.0%
remove-double-neg2.0%
distribute-lft-neg-out2.0%
distribute-lft-neg-in2.0%
remove-double-neg2.0%
fma-define2.0%
fma-define2.0%
fma-define2.0%
fma-define2.0%
Simplified2.0%
Taylor expanded in z around -inf 86.6%
Taylor expanded in y around 0 97.5%
associate-/l*100.0%
associate-*r/100.0%
distribute-lft-in100.0%
metadata-eval100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
if -5.4e52 < z < 5.80000000000000013e38Initial program 97.8%
Final simplification98.7%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
1e+294)
(+
x
(/
(* y (fma (fma (fma (fma z 3.13060547623 11.1667541262) z t) z a) z b))
(fma
(fma (fma (+ z 15.234687407) z 31.4690115749) z 11.9400905721)
z
0.607771387771)))
(fma
y
(+
3.13060547623
(/
(-
(/
(+
(+ t 457.9610022158428)
(/
(+ (+ -6976.8927133548 (* t -15.234687407)) (+ a 1112.0901850848957))
z))
z)
36.52704169880642)
z))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= 1e+294) {
tmp = x + ((y * fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)) / fma(fma(fma((z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771));
} else {
tmp = fma(y, (3.13060547623 + (((((t + 457.9610022158428) + (((-6976.8927133548 + (t * -15.234687407)) + (a + 1112.0901850848957)) / z)) / z) - 36.52704169880642) / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= 1e+294) tmp = Float64(x + Float64(Float64(y * fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)) / fma(fma(fma(Float64(z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771))); else tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(Float64(Float64(t + 457.9610022158428) + Float64(Float64(Float64(-6976.8927133548 + Float64(t * -15.234687407)) + Float64(a + 1112.0901850848957)) / z)) / z) - 36.52704169880642) / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], 1e+294], N[(x + N[(N[(y * N[(N[(N[(N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(3.13060547623 + N[(N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] + N[(N[(N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision] + N[(a + 1112.0901850848957), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq 10^{+294}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{\frac{\left(t + 457.9610022158428\right) + \frac{\left(-6976.8927133548 + t \cdot -15.234687407\right) + \left(a + 1112.0901850848957\right)}{z}}{z} - 36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 1.00000000000000007e294Initial program 98.3%
remove-double-neg98.3%
distribute-lft-neg-out98.3%
distribute-lft-neg-in98.3%
remove-double-neg98.3%
fma-define98.3%
fma-define98.3%
fma-define98.3%
fma-define98.3%
Simplified98.3%
if 1.00000000000000007e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 9.8%
Simplified11.3%
Taylor expanded in z around -inf 97.6%
Simplified97.6%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 1e+294)
(+ t_1 x)
(fma
y
(+
3.13060547623
(/
(-
(/
(+
(+ t 457.9610022158428)
(/
(+
(+ -6976.8927133548 (* t -15.234687407))
(+ a 1112.0901850848957))
z))
z)
36.52704169880642)
z))
x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_1 <= 1e+294) {
tmp = t_1 + x;
} else {
tmp = fma(y, (3.13060547623 + (((((t + 457.9610022158428) + (((-6976.8927133548 + (t * -15.234687407)) + (a + 1112.0901850848957)) / z)) / z) - 36.52704169880642) / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) tmp = 0.0 if (t_1 <= 1e+294) tmp = Float64(t_1 + x); else tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(Float64(Float64(t + 457.9610022158428) + Float64(Float64(Float64(-6976.8927133548 + Float64(t * -15.234687407)) + Float64(a + 1112.0901850848957)) / z)) / z) - 36.52704169880642) / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+294], N[(t$95$1 + x), $MachinePrecision], N[(y * N[(3.13060547623 + N[(N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] + N[(N[(N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision] + N[(a + 1112.0901850848957), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq 10^{+294}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{\frac{\left(t + 457.9610022158428\right) + \frac{\left(-6976.8927133548 + t \cdot -15.234687407\right) + \left(a + 1112.0901850848957\right)}{z}}{z} - 36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 1.00000000000000007e294Initial program 98.3%
if 1.00000000000000007e294 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 9.8%
Simplified11.3%
Taylor expanded in z around -inf 97.6%
Simplified97.6%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -5.4e+52) (not (<= z 2.3e+23)))
(+
x
(+
(* y (/ (- (/ (- t -457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+52) || !(z <= 2.3e+23)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
}
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 <= (-5.4d+52)) .or. (.not. (z <= 2.3d+23))) then
tmp = x + ((y * ((((t - (-457.9610022158428d0)) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
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 <= -5.4e+52) || !(z <= 2.3e+23)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e+52) or not (z <= 2.3e+23): tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e+52) || !(z <= 2.3e+23)) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t - -457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e+52) || ~((z <= 2.3e+23))) tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e+52], N[Not[LessEqual[z, 2.3e+23]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t - -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+52} \lor \neg \left(z \leq 2.3 \cdot 10^{+23}\right):\\
\;\;\;\;x + \left(y \cdot \frac{\frac{t - -457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\end{array}
\end{array}
if z < -5.4e52 or 2.3e23 < z Initial program 5.2%
remove-double-neg5.2%
distribute-lft-neg-out5.2%
distribute-lft-neg-in5.2%
remove-double-neg5.2%
fma-define5.2%
fma-define5.2%
fma-define5.2%
fma-define5.2%
Simplified5.2%
Taylor expanded in z around -inf 85.2%
Taylor expanded in y around 0 95.6%
associate-/l*97.9%
associate-*r/97.9%
distribute-lft-in97.9%
metadata-eval97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
if -5.4e52 < z < 2.3e23Initial program 99.1%
Taylor expanded in z around 0 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -115000.0) (not (<= z 1850.0)))
(+
x
(+
(* y (/ (- (/ (- t -457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -115000.0) || !(z <= 1850.0)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
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 <= (-115000.0d0)) .or. (.not. (z <= 1850.0d0))) then
tmp = x + ((y * ((((t - (-457.9610022158428d0)) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
else
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
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 <= -115000.0) || !(z <= 1850.0)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -115000.0) or not (z <= 1850.0): tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) else: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -115000.0) || !(z <= 1850.0)) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t - -457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -115000.0) || ~((z <= 1850.0))) tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); else tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -115000.0], N[Not[LessEqual[z, 1850.0]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t - -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -115000 \lor \neg \left(z \leq 1850\right):\\
\;\;\;\;x + \left(y \cdot \frac{\frac{t - -457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -115000 or 1850 < z Initial program 11.7%
remove-double-neg11.7%
distribute-lft-neg-out11.7%
distribute-lft-neg-in11.7%
remove-double-neg11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
Simplified11.8%
Taylor expanded in z around -inf 83.1%
Taylor expanded in y around 0 92.7%
associate-/l*94.8%
associate-*r/94.8%
distribute-lft-in94.8%
metadata-eval94.8%
mul-1-neg94.8%
unsub-neg94.8%
Simplified94.8%
if -115000 < z < 1850Initial program 99.8%
Taylor expanded in z around 0 98.9%
*-commutative98.9%
Simplified98.9%
Final simplification96.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y (* z a)) (+ 0.607771387771 (* z 11.9400905721)))))
(t_2 (+ x (* y 3.13060547623))))
(if (<= z -600000.0)
t_2
(if (<= z -1.02e-100)
t_1
(if (<= z 1.15e-87)
(+ x (* y (* b 1.6453555072203998)))
(if (<= z 1.2e+21) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * (z * a)) / (0.607771387771 + (z * 11.9400905721)));
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -600000.0) {
tmp = t_2;
} else if (z <= -1.02e-100) {
tmp = t_1;
} else if (z <= 1.15e-87) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 1.2e+21) {
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 = x + ((y * (z * a)) / (0.607771387771d0 + (z * 11.9400905721d0)))
t_2 = x + (y * 3.13060547623d0)
if (z <= (-600000.0d0)) then
tmp = t_2
else if (z <= (-1.02d-100)) then
tmp = t_1
else if (z <= 1.15d-87) then
tmp = x + (y * (b * 1.6453555072203998d0))
else if (z <= 1.2d+21) 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 = x + ((y * (z * a)) / (0.607771387771 + (z * 11.9400905721)));
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -600000.0) {
tmp = t_2;
} else if (z <= -1.02e-100) {
tmp = t_1;
} else if (z <= 1.15e-87) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 1.2e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * (z * a)) / (0.607771387771 + (z * 11.9400905721))) t_2 = x + (y * 3.13060547623) tmp = 0 if z <= -600000.0: tmp = t_2 elif z <= -1.02e-100: tmp = t_1 elif z <= 1.15e-87: tmp = x + (y * (b * 1.6453555072203998)) elif z <= 1.2e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * Float64(z * a)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))) t_2 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -600000.0) tmp = t_2; elseif (z <= -1.02e-100) tmp = t_1; elseif (z <= 1.15e-87) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); elseif (z <= 1.2e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * (z * a)) / (0.607771387771 + (z * 11.9400905721))); t_2 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -600000.0) tmp = t_2; elseif (z <= -1.02e-100) tmp = t_1; elseif (z <= 1.15e-87) tmp = x + (y * (b * 1.6453555072203998)); elseif (z <= 1.2e+21) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -600000.0], t$95$2, If[LessEqual[z, -1.02e-100], t$95$1, If[LessEqual[z, 1.15e-87], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot \left(z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -600000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-87}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6e5 or 1.2e21 < z Initial program 9.7%
Simplified11.2%
Taylor expanded in z around inf 93.5%
+-commutative93.5%
Simplified93.5%
if -6e5 < z < -1.02e-100 or 1.1500000000000001e-87 < z < 1.2e21Initial program 99.7%
Taylor expanded in z around 0 89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in a around inf 56.2%
*-commutative56.2%
associate-*l*64.0%
Simplified64.0%
if -1.02e-100 < z < 1.1500000000000001e-87Initial program 99.8%
remove-double-neg99.8%
distribute-lft-neg-out99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in b around inf 88.0%
Taylor expanded in z around 0 88.0%
associate-*r*88.0%
Simplified88.0%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -13.0) (not (<= z 1850.0)))
(+
x
(+
(* y (/ (- (/ (- t -457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -13.0) || !(z <= 1850.0)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
}
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 <= (-13.0d0)) .or. (.not. (z <= 1850.0d0))) then
tmp = x + ((y * ((((t - (-457.9610022158428d0)) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
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 <= -13.0) || !(z <= 1850.0)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -13.0) or not (z <= 1850.0): tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -13.0) || !(z <= 1850.0)) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t - -457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -13.0) || ~((z <= 1850.0))) tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -13.0], N[Not[LessEqual[z, 1850.0]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t - -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13 \lor \neg \left(z \leq 1850\right):\\
\;\;\;\;x + \left(y \cdot \frac{\frac{t - -457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -13 or 1850 < z Initial program 12.4%
remove-double-neg12.4%
distribute-lft-neg-out12.4%
distribute-lft-neg-in12.4%
remove-double-neg12.4%
fma-define12.4%
fma-define12.4%
fma-define12.4%
fma-define12.4%
Simplified12.4%
Taylor expanded in z around -inf 82.5%
Taylor expanded in y around 0 92.0%
associate-/l*94.2%
associate-*r/94.2%
distribute-lft-in94.2%
metadata-eval94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
if -13 < z < 1850Initial program 99.8%
Taylor expanded in z around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in z around 0 99.4%
*-commutative99.8%
Simplified99.4%
Final simplification96.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -13.0) (not (<= z 440.0)))
(+
x
(+
(* y (/ (- (/ (- t -457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))
(+ x (/ (+ (* a (* y z)) (* y b)) (+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -13.0) || !(z <= 440.0)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
}
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 <= (-13.0d0)) .or. (.not. (z <= 440.0d0))) then
tmp = x + ((y * ((((t - (-457.9610022158428d0)) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
else
tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
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 <= -13.0) || !(z <= 440.0)) {
tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -13.0) or not (z <= 440.0): tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) else: tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -13.0) || !(z <= 440.0)) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t - -457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(Float64(a * Float64(y * z)) + Float64(y * b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -13.0) || ~((z <= 440.0))) tmp = x + ((y * ((((t - -457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); else tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -13.0], N[Not[LessEqual[z, 440.0]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t - -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13 \lor \neg \left(z \leq 440\right):\\
\;\;\;\;x + \left(y \cdot \frac{\frac{t - -457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right) + y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -13 or 440 < z Initial program 12.4%
remove-double-neg12.4%
distribute-lft-neg-out12.4%
distribute-lft-neg-in12.4%
remove-double-neg12.4%
fma-define12.4%
fma-define12.4%
fma-define12.4%
fma-define12.4%
Simplified12.4%
Taylor expanded in z around -inf 82.5%
Taylor expanded in y around 0 92.0%
associate-/l*94.2%
associate-*r/94.2%
distribute-lft-in94.2%
metadata-eval94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
if -13 < z < 440Initial program 99.8%
Taylor expanded in z around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in z around 0 86.2%
Final simplification90.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -220000.0) (not (<= z 3.5e+15))) (+ x (* y 3.13060547623)) (+ x (/ (+ (* a (* y z)) (* y b)) (+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -220000.0) || !(z <= 3.5e+15)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
}
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 <= (-220000.0d0)) .or. (.not. (z <= 3.5d+15))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
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 <= -220000.0) || !(z <= 3.5e+15)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -220000.0) or not (z <= 3.5e+15): tmp = x + (y * 3.13060547623) else: tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -220000.0) || !(z <= 3.5e+15)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(Float64(Float64(a * Float64(y * z)) + Float64(y * b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -220000.0) || ~((z <= 3.5e+15))) tmp = x + (y * 3.13060547623); else tmp = x + (((a * (y * z)) + (y * b)) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -220000.0], N[Not[LessEqual[z, 3.5e+15]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -220000 \lor \neg \left(z \leq 3.5 \cdot 10^{+15}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right) + y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -2.2e5 or 3.5e15 < z Initial program 9.7%
Simplified11.2%
Taylor expanded in z around inf 93.5%
+-commutative93.5%
Simplified93.5%
if -2.2e5 < z < 3.5e15Initial program 99.8%
Taylor expanded in z around 0 96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in z around 0 83.7%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.4e+52)
(+ x (* y 3.13060547623))
(if (<= z 8.2e-54)
(+ x (* y (+ (* b 1.6453555072203998) (* -32.324150453290734 (* z b)))))
(+ x (+ (* y 3.13060547623) (* -36.52704169880642 (/ y z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.4e+52) {
tmp = x + (y * 3.13060547623);
} else if (z <= 8.2e-54) {
tmp = x + (y * ((b * 1.6453555072203998) + (-32.324150453290734 * (z * b))));
} else {
tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / 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 (z <= (-5.4d+52)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 8.2d-54) then
tmp = x + (y * ((b * 1.6453555072203998d0) + ((-32.324150453290734d0) * (z * b))))
else
tmp = x + ((y * 3.13060547623d0) + ((-36.52704169880642d0) * (y / 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 (z <= -5.4e+52) {
tmp = x + (y * 3.13060547623);
} else if (z <= 8.2e-54) {
tmp = x + (y * ((b * 1.6453555072203998) + (-32.324150453290734 * (z * b))));
} else {
tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.4e+52: tmp = x + (y * 3.13060547623) elif z <= 8.2e-54: tmp = x + (y * ((b * 1.6453555072203998) + (-32.324150453290734 * (z * b)))) else: tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.4e+52) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 8.2e-54) tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(-32.324150453290734 * Float64(z * b))))); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) + Float64(-36.52704169880642 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.4e+52) tmp = x + (y * 3.13060547623); elseif (z <= 8.2e-54) tmp = x + (y * ((b * 1.6453555072203998) + (-32.324150453290734 * (z * b)))); else tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.4e+52], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-54], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(-32.324150453290734 * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(-36.52704169880642 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+52}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-54}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + -32.324150453290734 \cdot \left(z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + -36.52704169880642 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -5.4e52Initial program 0.2%
Simplified0.2%
Taylor expanded in z around inf 96.3%
+-commutative96.3%
Simplified96.3%
if -5.4e52 < z < 8.2000000000000001e-54Initial program 99.1%
remove-double-neg99.1%
distribute-lft-neg-out99.1%
distribute-lft-neg-in99.1%
remove-double-neg99.1%
fma-define99.1%
fma-define99.1%
fma-define99.1%
fma-define99.1%
Simplified99.1%
Taylor expanded in b around inf 74.6%
Taylor expanded in z around 0 73.8%
Taylor expanded in y around 0 74.6%
if 8.2000000000000001e-54 < z Initial program 22.4%
Simplified24.9%
Taylor expanded in z around -inf 89.4%
Simplified89.4%
Taylor expanded in z around inf 84.9%
Final simplification82.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.6e-12) (not (<= z 64000000.0))) (+ x (* y 3.13060547623)) (+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.6e-12) || !(z <= 64000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
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 <= (-3.6d-12)) .or. (.not. (z <= 64000000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (y * (b * 1.6453555072203998d0))
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 <= -3.6e-12) || !(z <= 64000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.6e-12) or not (z <= 64000000.0): tmp = x + (y * 3.13060547623) else: tmp = x + (y * (b * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.6e-12) || !(z <= 64000000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.6e-12) || ~((z <= 64000000.0))) tmp = x + (y * 3.13060547623); else tmp = x + (y * (b * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.6e-12], N[Not[LessEqual[z, 64000000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-12} \lor \neg \left(z \leq 64000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -3.6e-12 or 6.4e7 < z Initial program 12.4%
Simplified13.9%
Taylor expanded in z around inf 90.8%
+-commutative90.8%
Simplified90.8%
if -3.6e-12 < z < 6.4e7Initial program 99.8%
remove-double-neg99.8%
distribute-lft-neg-out99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in b around inf 73.2%
Taylor expanded in z around 0 73.2%
associate-*r*73.2%
Simplified73.2%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.6e-12)
(+ x (+ (* y 3.13060547623) (* -36.52704169880642 (/ y z))))
(if (<= z 580000000000.0)
(+ x (* y (* b 1.6453555072203998)))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.6e-12) {
tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z)));
} else if (z <= 580000000000.0) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
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 <= (-3.6d-12)) then
tmp = x + ((y * 3.13060547623d0) + ((-36.52704169880642d0) * (y / z)))
else if (z <= 580000000000.0d0) then
tmp = x + (y * (b * 1.6453555072203998d0))
else
tmp = x + (y * 3.13060547623d0)
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 <= -3.6e-12) {
tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z)));
} else if (z <= 580000000000.0) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.6e-12: tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z))) elif z <= 580000000000.0: tmp = x + (y * (b * 1.6453555072203998)) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.6e-12) tmp = Float64(x + Float64(Float64(y * 3.13060547623) + Float64(-36.52704169880642 * Float64(y / z)))); elseif (z <= 580000000000.0) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.6e-12) tmp = x + ((y * 3.13060547623) + (-36.52704169880642 * (y / z))); elseif (z <= 580000000000.0) tmp = x + (y * (b * 1.6453555072203998)); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.6e-12], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(-36.52704169880642 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 580000000000.0], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-12}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + -36.52704169880642 \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 580000000000:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -3.6e-12Initial program 14.8%
Simplified14.7%
Taylor expanded in z around -inf 97.3%
Simplified97.3%
Taylor expanded in z around inf 89.1%
if -3.6e-12 < z < 5.8e11Initial program 99.8%
remove-double-neg99.8%
distribute-lft-neg-out99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in b around inf 73.2%
Taylor expanded in z around 0 73.2%
associate-*r*73.2%
Simplified73.2%
if 5.8e11 < z Initial program 10.3%
Simplified13.1%
Taylor expanded in z around inf 92.3%
+-commutative92.3%
Simplified92.3%
Final simplification82.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.4e+30) (not (<= y 3.6e+75))) (* y 3.13060547623) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.4e+30) || !(y <= 3.6e+75)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.4d+30)) .or. (.not. (y <= 3.6d+75))) then
tmp = y * 3.13060547623d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.4e+30) || !(y <= 3.6e+75)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.4e+30) or not (y <= 3.6e+75): tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.4e+30) || !(y <= 3.6e+75)) tmp = Float64(y * 3.13060547623); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.4e+30) || ~((y <= 3.6e+75))) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.4e+30], N[Not[LessEqual[y, 3.6e+75]], $MachinePrecision]], N[(y * 3.13060547623), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+30} \lor \neg \left(y \leq 3.6 \cdot 10^{+75}\right):\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.39999999999999992e30 or 3.6e75 < y Initial program 48.2%
Simplified50.1%
Taylor expanded in z around inf 55.1%
+-commutative55.1%
Simplified55.1%
Taylor expanded in y around inf 42.8%
if -1.39999999999999992e30 < y < 3.6e75Initial program 59.1%
Simplified59.0%
Taylor expanded in y around 0 67.6%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (+ x (* y 3.13060547623)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
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 * 3.13060547623d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
def code(x, y, z, t, a, b): return x + (y * 3.13060547623)
function code(x, y, z, t, a, b) return Float64(x + Float64(y * 3.13060547623)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y * 3.13060547623); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 3.13060547623
\end{array}
Initial program 54.7%
Simplified55.5%
Taylor expanded in z around inf 66.5%
+-commutative66.5%
Simplified66.5%
Final simplification66.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 54.7%
Simplified55.5%
Taylor expanded in y around 0 46.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(*
(+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z)))
(/ y 1.0)))))
(if (< z -6.499344996252632e+53)
t_1
(if (< z 7.066965436914287e+59)
(+
x
(/
y
(/
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + 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 = x + (((3.13060547623d0 - (36.527041698806414d0 / z)) + (t / (z * z))) * (y / 1.0d0))
if (z < (-6.499344996252632d+53)) then
tmp = t_1
else if (z < 7.066965436914287d+59) then
tmp = x + (y / ((((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0) / ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + 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 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)) tmp = 0 if z < -6.499344996252632e+53: tmp = t_1 elif z < 7.066965436914287e+59: tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(3.13060547623 - Float64(36.527041698806414 / z)) + Float64(t / Float64(z * z))) * Float64(y / 1.0))) tmp = 0.0 if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)); tmp = 0.0; if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))); 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[(3.13060547623 - N[(36.527041698806414 / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -6.499344996252632e+53], t$95$1, If[Less[z, 7.066965436914287e+59], N[(x + N[(y / N[(N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
\mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024170
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (if (< z -649934499625263200000000000000000000000000000000000000) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))) (if (< z 706696543691428700000000000000000000000000000000000000000000) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000) (+ (* (+ (* (+ (* (+ (* z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)))) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))))))
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))