
(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 14 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 (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(fma
y
(/
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
x)
(fma
y
(+ 3.13060547623 (/ (- (/ (+ t 457.9610022158428) 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)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
} else {
tmp = fma(y, (3.13060547623 + ((((t + 457.9610022158428) / 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)) <= Inf) tmp = fma(y, Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x); else tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(Float64(t + 457.9610022158428) / 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], Infinity], N[(y * N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(3.13060547623 + N[(N[(N[(N[(t + 457.9610022158428), $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 \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{\frac{t + 457.9610022158428}{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))) < +inf.0Initial program 93.7%
Simplified98.6%
if +inf.0 < (/.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 0.0%
Simplified0.0%
Taylor expanded in z around -inf 99.9%
mul-1-neg99.9%
unsub-neg99.9%
mul-1-neg99.9%
unsub-neg99.9%
+-commutative99.9%
Simplified99.9%
Final simplification99.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1e+36) (not (<= z 2850000.0)))
(+
x
(+
(/
(+
(-
(*
y
(/
(+
(+ t 457.9610022158428)
(/
(+
a
(+ 1112.0901850848957 (+ -6976.8927133548 (* t -15.234687407))))
z))
z))
(* y -11.1667541262))
(* y -47.69379582500642))
z)
(* y 3.13060547623)))
(+
x
(/
(* y (+ b (* z (+ a (* z t)))))
(+
(* 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 <= -1e+36) || !(z <= 2850000.0)) {
tmp = x + (((((y * (((t + 457.9610022158428) + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z)) / z)) - (y * -11.1667541262)) + (y * -47.69379582500642)) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= (-1d+36)) .or. (.not. (z <= 2850000.0d0))) then
tmp = x + (((((y * (((t + 457.9610022158428d0) + ((a + (1112.0901850848957d0 + ((-6976.8927133548d0) + (t * (-15.234687407d0))))) / z)) / z)) - (y * (-11.1667541262d0))) + (y * (-47.69379582500642d0))) / z) + (y * 3.13060547623d0))
else
tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= -1e+36) || !(z <= 2850000.0)) {
tmp = x + (((((y * (((t + 457.9610022158428) + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z)) / z)) - (y * -11.1667541262)) + (y * -47.69379582500642)) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= -1e+36) or not (z <= 2850000.0): tmp = x + (((((y * (((t + 457.9610022158428) + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z)) / z)) - (y * -11.1667541262)) + (y * -47.69379582500642)) / z) + (y * 3.13060547623)) else: tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= -1e+36) || !(z <= 2850000.0)) tmp = Float64(x + Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(Float64(t + 457.9610022158428) + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z)) / z)) - Float64(y * -11.1667541262)) + Float64(y * -47.69379582500642)) / z) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t))))) / 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 <= -1e+36) || ~((z <= 2850000.0))) tmp = x + (((((y * (((t + 457.9610022158428) + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z)) / z)) - (y * -11.1667541262)) + (y * -47.69379582500642)) / z) + (y * 3.13060547623)); else tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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, -1e+36], N[Not[LessEqual[z, 2850000.0]], $MachinePrecision]], N[(x + N[(N[(N[(N[(N[(y * N[(N[(N[(t + 457.9610022158428), $MachinePrecision] + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision] + N[(y * -47.69379582500642), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * t), $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 -1 \cdot 10^{+36} \lor \neg \left(z \leq 2850000\right):\\
\;\;\;\;x + \left(\frac{\left(y \cdot \frac{\left(t + 457.9610022158428\right) + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}}{z} - y \cdot -11.1667541262\right) + y \cdot -47.69379582500642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot t\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 < -1.00000000000000004e36 or 2.85e6 < z Initial program 13.4%
Simplified19.6%
Taylor expanded in z around -inf 79.6%
Taylor expanded in y around 0 87.2%
mul-1-neg87.2%
associate-/l*98.9%
associate-+r+98.9%
+-commutative98.9%
mul-1-neg98.9%
mul-1-neg98.9%
distribute-lft-in98.9%
metadata-eval98.9%
Simplified98.9%
if -1.00000000000000004e36 < z < 2.85e6Initial program 98.5%
Taylor expanded in z around 0 92.0%
Taylor expanded in y around 0 98.5%
Final simplification98.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.3e+36) (not (<= z 67000000.0)))
(+
x
(+
(* y 3.13060547623)
(/
(+
(* y -47.69379582500642)
(- (* t (/ (- y (/ (* y 15.234687407) z)) z)) (* y -11.1667541262)))
z)))
(+
x
(/
(* y (+ b (* z (+ a (* z t)))))
(+
(* 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 <= -1.3e+36) || !(z <= 67000000.0)) {
tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z));
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= (-1.3d+36)) .or. (.not. (z <= 67000000.0d0))) then
tmp = x + ((y * 3.13060547623d0) + (((y * (-47.69379582500642d0)) + ((t * ((y - ((y * 15.234687407d0) / z)) / z)) - (y * (-11.1667541262d0)))) / z))
else
tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= -1.3e+36) || !(z <= 67000000.0)) {
tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z));
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= -1.3e+36) or not (z <= 67000000.0): tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z)) else: tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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 <= -1.3e+36) || !(z <= 67000000.0)) tmp = Float64(x + Float64(Float64(y * 3.13060547623) + Float64(Float64(Float64(y * -47.69379582500642) + Float64(Float64(t * Float64(Float64(y - Float64(Float64(y * 15.234687407) / z)) / z)) - Float64(y * -11.1667541262))) / z))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t))))) / 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 <= -1.3e+36) || ~((z <= 67000000.0))) tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z)); else tmp = x + ((y * (b + (z * (a + (z * t))))) / ((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, -1.3e+36], N[Not[LessEqual[z, 67000000.0]], $MachinePrecision]], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(N[(N[(y * -47.69379582500642), $MachinePrecision] + N[(N[(t * N[(N[(y - N[(N[(y * 15.234687407), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * t), $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 -1.3 \cdot 10^{+36} \lor \neg \left(z \leq 67000000\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot -47.69379582500642 + \left(t \cdot \frac{y - \frac{y \cdot 15.234687407}{z}}{z} - y \cdot -11.1667541262\right)}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot t\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 < -1.3000000000000001e36 or 6.7e7 < z Initial program 13.4%
Simplified19.6%
Taylor expanded in z around -inf 79.6%
Taylor expanded in t around -inf 88.2%
associate-/l*96.1%
+-commutative96.1%
mul-1-neg96.1%
unsub-neg96.1%
associate-*r/96.1%
*-commutative96.1%
Simplified96.1%
if -1.3000000000000001e36 < z < 6.7e7Initial program 98.5%
Taylor expanded in z around 0 92.0%
Taylor expanded in y around 0 98.5%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.05e+34) (not (<= z 18000.0)))
(+
x
(+
(* y 3.13060547623)
(/
(+
(* y -47.69379582500642)
(- (* t (/ (- y (/ (* y 15.234687407) z)) z)) (* y -11.1667541262)))
z)))
(+
x
(/
(* y (+ b (* z (+ a (* z t)))))
(+ 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 <= -1.05e+34) || !(z <= 18000.0)) {
tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z));
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (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 <= (-1.05d+34)) .or. (.not. (z <= 18000.0d0))) then
tmp = x + ((y * 3.13060547623d0) + (((y * (-47.69379582500642d0)) + ((t * ((y - ((y * 15.234687407d0) / z)) / z)) - (y * (-11.1667541262d0)))) / z))
else
tmp = x + ((y * (b + (z * (a + (z * t))))) / (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 <= -1.05e+34) || !(z <= 18000.0)) {
tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z));
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.05e+34) or not (z <= 18000.0): tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z)) else: tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.05e+34) || !(z <= 18000.0)) tmp = Float64(x + Float64(Float64(y * 3.13060547623) + Float64(Float64(Float64(y * -47.69379582500642) + Float64(Float64(t * Float64(Float64(y - Float64(Float64(y * 15.234687407) / z)) / z)) - Float64(y * -11.1667541262))) / z))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t))))) / 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 <= -1.05e+34) || ~((z <= 18000.0))) tmp = x + ((y * 3.13060547623) + (((y * -47.69379582500642) + ((t * ((y - ((y * 15.234687407) / z)) / z)) - (y * -11.1667541262))) / z)); else tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.05e+34], N[Not[LessEqual[z, 18000.0]], $MachinePrecision]], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(N[(N[(y * -47.69379582500642), $MachinePrecision] + N[(N[(t * N[(N[(y - N[(N[(y * 15.234687407), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -1.05 \cdot 10^{+34} \lor \neg \left(z \leq 18000\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot -47.69379582500642 + \left(t \cdot \frac{y - \frac{y \cdot 15.234687407}{z}}{z} - y \cdot -11.1667541262\right)}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot t\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -1.05000000000000009e34 or 18000 < z Initial program 15.8%
Simplified21.8%
Taylor expanded in z around -inf 79.8%
Taylor expanded in t around -inf 88.1%
associate-/l*95.8%
+-commutative95.8%
mul-1-neg95.8%
unsub-neg95.8%
associate-*r/95.8%
*-commutative95.8%
Simplified95.8%
if -1.05000000000000009e34 < z < 18000Initial program 98.5%
Taylor expanded in z around 0 91.8%
Taylor expanded in y around 0 98.5%
Taylor expanded in z around 0 98.1%
Final simplification97.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y 3.13060547623))))
(if (<= z -7.2e+34)
t_1
(if (<= z 14500000000000.0)
(+
x
(/
(* y (+ b (* z (+ a (* z t)))))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
(if (<= z 9e+120)
(*
y
(+
(+
3.13060547623
(/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
(/ x y)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -7.2e+34) {
tmp = t_1;
} else if (z <= 14500000000000.0) {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else if (z <= 9e+120) {
tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * 3.13060547623d0)
if (z <= (-7.2d+34)) then
tmp = t_1
else if (z <= 14500000000000.0d0) then
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
else if (z <= 9d+120) then
tmp = y * ((3.13060547623d0 + ((((t + 457.9610022158428d0) / z) - 36.52704169880642d0) / z)) + (x / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -7.2e+34) {
tmp = t_1;
} else if (z <= 14500000000000.0) {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else if (z <= 9e+120) {
tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * 3.13060547623) tmp = 0 if z <= -7.2e+34: tmp = t_1 elif z <= 14500000000000.0: tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) elif z <= 9e+120: tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -7.2e+34) tmp = t_1; elseif (z <= 14500000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); elseif (z <= 9e+120) tmp = Float64(y * Float64(Float64(3.13060547623 + Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(x / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -7.2e+34) tmp = t_1; elseif (z <= 14500000000000.0) tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); elseif (z <= 9e+120) tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+34], t$95$1, If[LessEqual[z, 14500000000000.0], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+120], N[(y * N[(N[(3.13060547623 + N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 14500000000000:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot t\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+120}:\\
\;\;\;\;y \cdot \left(\left(3.13060547623 + \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z}\right) + \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2000000000000001e34 or 8.99999999999999953e120 < z Initial program 10.8%
Simplified13.9%
Taylor expanded in z around inf 96.9%
if -7.2000000000000001e34 < z < 1.45e13Initial program 98.5%
Taylor expanded in z around 0 92.0%
Taylor expanded in y around 0 98.5%
Taylor expanded in z around 0 97.5%
if 1.45e13 < z < 8.99999999999999953e120Initial program 32.1%
Simplified61.3%
Taylor expanded in y around -inf 61.3%
Taylor expanded in z around -inf 92.6%
mul-1-neg92.6%
unsub-neg92.6%
mul-1-neg92.6%
unsub-neg92.6%
+-commutative92.6%
Simplified92.6%
Final simplification97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y 3.13060547623))))
(if (<= z -13.0)
t_1
(if (<= z 9000000000000.0)
(+
x
(/
(* y (+ b (* z (+ a (* z t)))))
(+ 0.607771387771 (* z 11.9400905721))))
(if (<= z 1.02e+121)
(*
y
(+
(+
3.13060547623
(/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
(/ x y)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -13.0) {
tmp = t_1;
} else if (z <= 9000000000000.0) {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 1.02e+121) {
tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * 3.13060547623d0)
if (z <= (-13.0d0)) then
tmp = t_1
else if (z <= 9000000000000.0d0) then
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else if (z <= 1.02d+121) then
tmp = y * ((3.13060547623d0 + ((((t + 457.9610022158428d0) / z) - 36.52704169880642d0) / z)) + (x / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -13.0) {
tmp = t_1;
} else if (z <= 9000000000000.0) {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 1.02e+121) {
tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * 3.13060547623) tmp = 0 if z <= -13.0: tmp = t_1 elif z <= 9000000000000.0: tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * 11.9400905721))) elif z <= 1.02e+121: tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -13.0) tmp = t_1; elseif (z <= 9000000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); elseif (z <= 1.02e+121) tmp = Float64(y * Float64(Float64(3.13060547623 + Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(x / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -13.0) tmp = t_1; elseif (z <= 9000000000000.0) tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * 11.9400905721))); elseif (z <= 1.02e+121) tmp = y * ((3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (x / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -13.0], t$95$1, If[LessEqual[z, 9000000000000.0], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+121], N[(y * N[(N[(3.13060547623 + N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -13:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9000000000000:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot t\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+121}:\\
\;\;\;\;y \cdot \left(\left(3.13060547623 + \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z}\right) + \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -13 or 1.02000000000000005e121 < z Initial program 12.6%
Simplified17.3%
Taylor expanded in z around inf 93.0%
if -13 < z < 9e12Initial program 99.7%
Taylor expanded in z around 0 94.4%
Taylor expanded in y around 0 99.7%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
if 9e12 < z < 1.02000000000000005e121Initial program 32.1%
Simplified61.3%
Taylor expanded in y around -inf 61.3%
Taylor expanded in z around -inf 92.6%
mul-1-neg92.6%
unsub-neg92.6%
mul-1-neg92.6%
unsub-neg92.6%
+-commutative92.6%
Simplified92.6%
Final simplification96.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -13.0) (not (<= z 70000000.0)))
(+ x (* y 3.13060547623))
(+
x
(/
(* y (+ b (* z (+ a (* z t)))))
(+ 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 <= 70000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (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 <= 70000000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + ((y * (b + (z * (a + (z * t))))) / (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 <= 70000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -13.0) or not (z <= 70000000.0): tmp = x + (y * 3.13060547623) else: tmp = x + ((y * (b + (z * (a + (z * t))))) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -13.0) || !(z <= 70000000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t))))) / 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 <= 70000000.0))) tmp = x + (y * 3.13060547623); else tmp = x + ((y * (b + (z * (a + (z * t))))) / (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, 70000000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * t), $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 70000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot t\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -13 or 7e7 < z Initial program 15.6%
Simplified23.2%
Taylor expanded in z around inf 89.1%
if -13 < z < 7e7Initial program 99.7%
Taylor expanded in z around 0 94.4%
Taylor expanded in y around 0 99.7%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification94.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.8e+33) (not (<= z 20000.0))) (+ x (* y 3.13060547623)) (+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e+33) || !(z <= 20000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b + (z * a))) / (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 <= (-3.8d+33)) .or. (.not. (z <= 20000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + ((y * (b + (z * a))) / (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 <= -3.8e+33) || !(z <= 20000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.8e+33) or not (z <= 20000.0): tmp = x + (y * 3.13060547623) else: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.8e+33) || !(z <= 20000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / 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 <= -3.8e+33) || ~((z <= 20000.0))) tmp = x + (y * 3.13060547623); else tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.8e+33], N[Not[LessEqual[z, 20000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+33} \lor \neg \left(z \leq 20000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -3.80000000000000002e33 or 2e4 < z Initial program 16.5%
Simplified22.5%
Taylor expanded in z around inf 90.8%
if -3.80000000000000002e33 < z < 2e4Initial program 98.5%
Taylor expanded in z around 0 92.4%
Taylor expanded in y around 0 98.5%
Taylor expanded in z around 0 97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in z around 0 85.6%
associate-*r*82.9%
*-commutative82.9%
associate-*r*86.9%
*-commutative86.9%
distribute-rgt-in86.9%
Simplified86.9%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y 3.13060547623))))
(if (<= z -1.05e+34)
t_1
(if (<= z -1.35e-62)
(+ x (/ (* a (* y z)) (+ 0.607771387771 (* z 11.9400905721))))
(if (<= z 20000.0) (+ x (* y (* b 1.6453555072203998))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -1.05e+34) {
tmp = t_1;
} else if (z <= -1.35e-62) {
tmp = x + ((a * (y * z)) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 20000.0) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * 3.13060547623d0)
if (z <= (-1.05d+34)) then
tmp = t_1
else if (z <= (-1.35d-62)) then
tmp = x + ((a * (y * z)) / (0.607771387771d0 + (z * 11.9400905721d0)))
else if (z <= 20000.0d0) then
tmp = x + (y * (b * 1.6453555072203998d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -1.05e+34) {
tmp = t_1;
} else if (z <= -1.35e-62) {
tmp = x + ((a * (y * z)) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 20000.0) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * 3.13060547623) tmp = 0 if z <= -1.05e+34: tmp = t_1 elif z <= -1.35e-62: tmp = x + ((a * (y * z)) / (0.607771387771 + (z * 11.9400905721))) elif z <= 20000.0: tmp = x + (y * (b * 1.6453555072203998)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -1.05e+34) tmp = t_1; elseif (z <= -1.35e-62) tmp = Float64(x + Float64(Float64(a * Float64(y * z)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); elseif (z <= 20000.0) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -1.05e+34) tmp = t_1; elseif (z <= -1.35e-62) tmp = x + ((a * (y * z)) / (0.607771387771 + (z * 11.9400905721))); elseif (z <= 20000.0) tmp = x + (y * (b * 1.6453555072203998)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+34], t$95$1, If[LessEqual[z, -1.35e-62], N[(x + N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 20000.0], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-62}:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{elif}\;z \leq 20000:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.05000000000000009e34 or 2e4 < z Initial program 15.8%
Simplified21.8%
Taylor expanded in z around inf 91.7%
if -1.05000000000000009e34 < z < -1.3500000000000001e-62Initial program 90.1%
Taylor expanded in z around 0 78.9%
Taylor expanded in y around 0 90.1%
Taylor expanded in z around 0 74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in a around inf 65.0%
if -1.3500000000000001e-62 < z < 2e4Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 78.1%
associate-*r*78.2%
*-commutative78.2%
Simplified78.2%
Final simplification83.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e+36) (not (<= z 20000.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 <= -1e+36) || !(z <= 20000.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 <= (-1d+36)) .or. (.not. (z <= 20000.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 <= -1e+36) || !(z <= 20000.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 <= -1e+36) or not (z <= 20000.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 <= -1e+36) || !(z <= 20000.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 <= -1e+36) || ~((z <= 20000.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, -1e+36], N[Not[LessEqual[z, 20000.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 -1 \cdot 10^{+36} \lor \neg \left(z \leq 20000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -1.00000000000000004e36 or 2e4 < z Initial program 15.0%
Simplified21.1%
Taylor expanded in z around inf 91.6%
if -1.00000000000000004e36 < z < 2e4Initial program 98.5%
Simplified99.7%
Taylor expanded in z around 0 72.6%
associate-*r*72.6%
*-commutative72.6%
Simplified72.6%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.3e+37) (not (<= z 17000.0))) (+ x (* y 3.13060547623)) (+ x (* 1.6453555072203998 (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e+37) || !(z <= 17000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.3d+37)) .or. (.not. (z <= 17000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (1.6453555072203998d0 * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e+37) || !(z <= 17000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.3e+37) or not (z <= 17000.0): tmp = x + (y * 3.13060547623) else: tmp = x + (1.6453555072203998 * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.3e+37) || !(z <= 17000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.3e+37) || ~((z <= 17000.0))) tmp = x + (y * 3.13060547623); else tmp = x + (1.6453555072203998 * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.3e+37], N[Not[LessEqual[z, 17000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+37} \lor \neg \left(z \leq 17000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\end{array}
\end{array}
if z < -3.3000000000000001e37 or 17000 < z Initial program 15.0%
Simplified21.1%
Taylor expanded in z around inf 91.6%
if -3.3000000000000001e37 < z < 17000Initial program 98.5%
Simplified99.7%
Taylor expanded in z around 0 72.6%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e+36) (not (<= z 7.9e-84))) (+ x (* y 3.13060547623)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+36) || !(z <= 7.9e-84)) {
tmp = x + (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 ((z <= (-1d+36)) .or. (.not. (z <= 7.9d-84))) then
tmp = x + (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 ((z <= -1e+36) || !(z <= 7.9e-84)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e+36) or not (z <= 7.9e-84): tmp = x + (y * 3.13060547623) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e+36) || !(z <= 7.9e-84)) tmp = Float64(x + 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 ((z <= -1e+36) || ~((z <= 7.9e-84))) tmp = x + (y * 3.13060547623); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e+36], N[Not[LessEqual[z, 7.9e-84]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+36} \lor \neg \left(z \leq 7.9 \cdot 10^{-84}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.00000000000000004e36 or 7.89999999999999991e-84 < z Initial program 28.7%
Simplified33.7%
Taylor expanded in z around inf 79.5%
if -1.00000000000000004e36 < z < 7.89999999999999991e-84Initial program 98.3%
Simplified99.8%
Taylor expanded in y around 0 46.3%
Final simplification63.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.75e+113) (not (<= y 1.85e+74))) (* y 3.13060547623) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.75e+113) || !(y <= 1.85e+74)) {
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.75d+113)) .or. (.not. (y <= 1.85d+74))) 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.75e+113) || !(y <= 1.85e+74)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.75e+113) or not (y <= 1.85e+74): tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.75e+113) || !(y <= 1.85e+74)) 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.75e+113) || ~((y <= 1.85e+74))) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.75e+113], N[Not[LessEqual[y, 1.85e+74]], $MachinePrecision]], N[(y * 3.13060547623), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+113} \lor \neg \left(y \leq 1.85 \cdot 10^{+74}\right):\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.75e113 or 1.8500000000000001e74 < y Initial program 55.9%
Simplified62.3%
Taylor expanded in z around inf 48.4%
Taylor expanded in x around 0 42.2%
if -1.75e113 < y < 1.8500000000000001e74Initial program 66.6%
Simplified68.3%
Taylor expanded in y around 0 59.6%
Final simplification53.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 62.9%
Simplified66.2%
Taylor expanded in y around 0 43.5%
(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 2024177
(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))))