
(FPCore (x y z t a b) :precision binary64 :pre TRUE (- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))
double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = ((2.0d0 * sqrt(x)) * cos((y - ((z * t) / 3.0d0)))) - (a / (b * 3.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * Math.sqrt(x)) * Math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
def code(x, y, z, t, a, b): return ((2.0 * math.sqrt(x)) * math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0)))) - Float64(a / Float64(b * 3.0))) end
function tmp = code(x, y, z, t, a, b) tmp = ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (((2) * (sqrt(x))) * (cos((y - ((z * t) / (3)))))) - (a / (b * (3))) END code
\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3}
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 :pre TRUE (- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))
double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = ((2.0d0 * sqrt(x)) * cos((y - ((z * t) / 3.0d0)))) - (a / (b * 3.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * Math.sqrt(x)) * Math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
def code(x, y, z, t, a, b): return ((2.0 * math.sqrt(x)) * math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0)))) - Float64(a / Float64(b * 3.0))) end
function tmp = code(x, y, z, t, a, b) tmp = ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (((2) * (sqrt(x))) * (cos((y - ((z * t) / (3)))))) - (a / (b * (3))) END code
\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3}
(FPCore (x y z t a b) :precision binary64 :pre TRUE (- (* 2.0 (* (cos y) (sqrt x))) (/ (/ (- a) 3.0) (- b))))
double code(double x, double y, double z, double t, double a, double b) {
return (2.0 * (cos(y) * sqrt(x))) - ((-a / 3.0) / -b);
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = (2.0d0 * (cos(y) * sqrt(x))) - ((-a / 3.0d0) / -b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (2.0 * (Math.cos(y) * Math.sqrt(x))) - ((-a / 3.0) / -b);
}
def code(x, y, z, t, a, b): return (2.0 * (math.cos(y) * math.sqrt(x))) - ((-a / 3.0) / -b)
function code(x, y, z, t, a, b) return Float64(Float64(2.0 * Float64(cos(y) * sqrt(x))) - Float64(Float64(Float64(-a) / 3.0) / Float64(-b))) end
function tmp = code(x, y, z, t, a, b) tmp = (2.0 * (cos(y) * sqrt(x))) - ((-a / 3.0) / -b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(2.0 * N[(N[Cos[y], $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[((-a) / 3.0), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = ((2) * ((cos(y)) * (sqrt(x)))) - (((- a) / (3)) / (- b)) END code
2 \cdot \left(\cos y \cdot \sqrt{x}\right) - \frac{\frac{-a}{3}}{-b}
Initial program 69.9%
Applied rewrites69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (- (* (* 2.0 (sqrt x)) (cos y)) (/ a (* b 3.0))))
double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * sqrt(x)) * cos(y)) - (a / (b * 3.0));
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = ((2.0d0 * sqrt(x)) * cos(y)) - (a / (b * 3.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * Math.sqrt(x)) * Math.cos(y)) - (a / (b * 3.0));
}
def code(x, y, z, t, a, b): return ((2.0 * math.sqrt(x)) * math.cos(y)) - (a / (b * 3.0))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(y)) - Float64(a / Float64(b * 3.0))) end
function tmp = code(x, y, z, t, a, b) tmp = ((2.0 * sqrt(x)) * cos(y)) - (a / (b * 3.0)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (((2) * (sqrt(x))) * (cos(y))) - (a / (b * (3))) END code
\left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{a}{b \cdot 3}
Initial program 69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (fma -0.3333333333333333 (/ a b) (* 2.0 (* (cos y) (sqrt x)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(-0.3333333333333333, (a / b), (2.0 * (cos(y) * sqrt(x))));
}
function code(x, y, z, t, a, b) return fma(-0.3333333333333333, Float64(a / b), Float64(2.0 * Float64(cos(y) * sqrt(x)))) end
code[x_, y_, z_, t_, a_, b_] := N[(-0.3333333333333333 * N[(a / b), $MachinePrecision] + N[(2.0 * N[(N[Cos[y], $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = ((-333333333333333314829616256247390992939472198486328125e-54) * (a / b)) + ((2) * ((cos(y)) * (sqrt(x)))) END code
\mathsf{fma}\left(-0.3333333333333333, \frac{a}{b}, 2 \cdot \left(\cos y \cdot \sqrt{x}\right)\right)
Initial program 69.9%
Applied rewrites64.3%
Taylor expanded in z around 0
Applied rewrites76.5%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (* -0.3333333333333333 (fma -6.0 (* (cos y) (sqrt x)) (/ a b))))
double code(double x, double y, double z, double t, double a, double b) {
return -0.3333333333333333 * fma(-6.0, (cos(y) * sqrt(x)), (a / b));
}
function code(x, y, z, t, a, b) return Float64(-0.3333333333333333 * fma(-6.0, Float64(cos(y) * sqrt(x)), Float64(a / b))) end
code[x_, y_, z_, t_, a_, b_] := N[(-0.3333333333333333 * N[(-6.0 * N[(N[Cos[y], $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (-333333333333333314829616256247390992939472198486328125e-54) * (((-6) * ((cos(y)) * (sqrt(x)))) + (a / b)) END code
-0.3333333333333333 \cdot \mathsf{fma}\left(-6, \cos y \cdot \sqrt{x}, \frac{a}{b}\right)
Initial program 69.9%
Applied rewrites66.7%
Taylor expanded in z around 0
Applied rewrites73.3%
Taylor expanded in a around 0
Applied rewrites76.4%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0)))
(t_2 (- (* 2.0 (* 1.0 (sqrt x))) (/ (/ (- a) 3.0) (- b)))))
(if (<= t_1 -2e-17)
t_2
(if (<= t_1 5e-135)
(* 2.0 (* (cos (+ y (* -0.3333333333333333 (* t z)))) (sqrt x)))
t_2))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double t_2 = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b);
double tmp;
if (t_1 <= -2e-17) {
tmp = t_2;
} else if (t_1 <= 5e-135) {
tmp = 2.0 * (cos((y + (-0.3333333333333333 * (t * z)))) * sqrt(x));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = a / (b * 3.0d0)
t_2 = (2.0d0 * (1.0d0 * sqrt(x))) - ((-a / 3.0d0) / -b)
if (t_1 <= (-2d-17)) then
tmp = t_2
else if (t_1 <= 5d-135) then
tmp = 2.0d0 * (cos((y + ((-0.3333333333333333d0) * (t * z)))) * sqrt(x))
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 = a / (b * 3.0);
double t_2 = (2.0 * (1.0 * Math.sqrt(x))) - ((-a / 3.0) / -b);
double tmp;
if (t_1 <= -2e-17) {
tmp = t_2;
} else if (t_1 <= 5e-135) {
tmp = 2.0 * (Math.cos((y + (-0.3333333333333333 * (t * z)))) * Math.sqrt(x));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) t_2 = (2.0 * (1.0 * math.sqrt(x))) - ((-a / 3.0) / -b) tmp = 0 if t_1 <= -2e-17: tmp = t_2 elif t_1 <= 5e-135: tmp = 2.0 * (math.cos((y + (-0.3333333333333333 * (t * z)))) * math.sqrt(x)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) t_2 = Float64(Float64(2.0 * Float64(1.0 * sqrt(x))) - Float64(Float64(Float64(-a) / 3.0) / Float64(-b))) tmp = 0.0 if (t_1 <= -2e-17) tmp = t_2; elseif (t_1 <= 5e-135) tmp = Float64(2.0 * Float64(cos(Float64(y + Float64(-0.3333333333333333 * Float64(t * z)))) * sqrt(x))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); t_2 = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b); tmp = 0.0; if (t_1 <= -2e-17) tmp = t_2; elseif (t_1 <= 5e-135) tmp = 2.0 * (cos((y + (-0.3333333333333333 * (t * z)))) * sqrt(x)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * N[(1.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[((-a) / 3.0), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-17], t$95$2, If[LessEqual[t$95$1, 5e-135], N[(2.0 * N[(N[Cos[N[(y + N[(-0.3333333333333333 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET t_2 = (((2) * ((1) * (sqrt(x)))) - (((- a) / (3)) / (- b))) IN LET tmp_1 = IF (t_1 <= (50000000000000001985507167852432203201864073009270934282334838895804405434924636201595581601317127124865915453397311986880495099637390737936955218295631622949608574881151133122005933230987646514395910495137769196891284713371188260829599029527232218620529419564825381937228364025149362357942145104430718424941631206062509613051447754372702547698281705379486083984375e-499)) THEN ((2) * ((cos((y + ((-333333333333333314829616256247390992939472198486328125e-54) * (t * z))))) * (sqrt(x)))) ELSE t_2 ENDIF IN LET tmp = IF (t_1 <= (-20000000000000001430848481092438490170561123698464954523412728804032667540013790130615234375e-108)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := 2 \cdot \left(1 \cdot \sqrt{x}\right) - \frac{\frac{-a}{3}}{-b}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-135}:\\
\;\;\;\;2 \cdot \left(\cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right) \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -2.0000000000000001e-17 or 5.0000000000000002e-135 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Applied rewrites69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in y around 0
Applied rewrites65.2%
if -2.0000000000000001e-17 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 5.0000000000000002e-135Initial program 69.9%
Applied rewrites69.8%
Taylor expanded in a around 0
Applied rewrites28.0%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0)))
(t_2 (- (* 2.0 (* 1.0 (sqrt x))) (/ (/ (- a) 3.0) (- b)))))
(if (<= t_1 -2e-17)
t_2
(if (<= t_1 2e-157) (/ 1.0 (/ 0.5 (* (cos y) (sqrt x)))) t_2))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double t_2 = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b);
double tmp;
if (t_1 <= -2e-17) {
tmp = t_2;
} else if (t_1 <= 2e-157) {
tmp = 1.0 / (0.5 / (cos(y) * sqrt(x)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = a / (b * 3.0d0)
t_2 = (2.0d0 * (1.0d0 * sqrt(x))) - ((-a / 3.0d0) / -b)
if (t_1 <= (-2d-17)) then
tmp = t_2
else if (t_1 <= 2d-157) then
tmp = 1.0d0 / (0.5d0 / (cos(y) * sqrt(x)))
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 = a / (b * 3.0);
double t_2 = (2.0 * (1.0 * Math.sqrt(x))) - ((-a / 3.0) / -b);
double tmp;
if (t_1 <= -2e-17) {
tmp = t_2;
} else if (t_1 <= 2e-157) {
tmp = 1.0 / (0.5 / (Math.cos(y) * Math.sqrt(x)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) t_2 = (2.0 * (1.0 * math.sqrt(x))) - ((-a / 3.0) / -b) tmp = 0 if t_1 <= -2e-17: tmp = t_2 elif t_1 <= 2e-157: tmp = 1.0 / (0.5 / (math.cos(y) * math.sqrt(x))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) t_2 = Float64(Float64(2.0 * Float64(1.0 * sqrt(x))) - Float64(Float64(Float64(-a) / 3.0) / Float64(-b))) tmp = 0.0 if (t_1 <= -2e-17) tmp = t_2; elseif (t_1 <= 2e-157) tmp = Float64(1.0 / Float64(0.5 / Float64(cos(y) * sqrt(x)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); t_2 = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b); tmp = 0.0; if (t_1 <= -2e-17) tmp = t_2; elseif (t_1 <= 2e-157) tmp = 1.0 / (0.5 / (cos(y) * sqrt(x))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * N[(1.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[((-a) / 3.0), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-17], t$95$2, If[LessEqual[t$95$1, 2e-157], N[(1.0 / N[(0.5 / N[(N[Cos[y], $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET t_2 = (((2) * ((1) * (sqrt(x)))) - (((- a) / (3)) / (- b))) IN LET tmp_1 = IF (t_1 <= (199999999999999988630186635144705952778170484267472859439435467460781932253083148361342701173586372286213173942351045491180094527601461397496161201284274703173108563568910542618784490404054714151478526376026075639521149509525636954924806503632883016662647850397609480699480008024436924278659695063074712070184457650482931814692262210546393427354994865589432529551000686362919635252755057308604591526091098785400390625e-573)) THEN ((1) / ((5e-1) / ((cos(y)) * (sqrt(x))))) ELSE t_2 ENDIF IN LET tmp = IF (t_1 <= (-20000000000000001430848481092438490170561123698464954523412728804032667540013790130615234375e-108)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := 2 \cdot \left(1 \cdot \sqrt{x}\right) - \frac{\frac{-a}{3}}{-b}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\frac{1}{\frac{0.5}{\cos y \cdot \sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -2.0000000000000001e-17 or 1.9999999999999999e-157 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Applied rewrites69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in y around 0
Applied rewrites65.2%
if -2.0000000000000001e-17 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 1.9999999999999999e-157Initial program 69.9%
Applied rewrites69.8%
Taylor expanded in a around 0
Applied rewrites28.0%
Taylor expanded in z around 0
Applied rewrites28.6%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0)))
(t_2 (- (* 2.0 (* 1.0 (sqrt x))) (/ (/ (- a) 3.0) (- b)))))
(if (<= t_1 -2e-17)
t_2
(if (<= t_1 5e-135)
(* -0.3333333333333333 (* -6.0 (* (cos y) (sqrt x))))
t_2))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double t_2 = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b);
double tmp;
if (t_1 <= -2e-17) {
tmp = t_2;
} else if (t_1 <= 5e-135) {
tmp = -0.3333333333333333 * (-6.0 * (cos(y) * sqrt(x)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = a / (b * 3.0d0)
t_2 = (2.0d0 * (1.0d0 * sqrt(x))) - ((-a / 3.0d0) / -b)
if (t_1 <= (-2d-17)) then
tmp = t_2
else if (t_1 <= 5d-135) then
tmp = (-0.3333333333333333d0) * ((-6.0d0) * (cos(y) * sqrt(x)))
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 = a / (b * 3.0);
double t_2 = (2.0 * (1.0 * Math.sqrt(x))) - ((-a / 3.0) / -b);
double tmp;
if (t_1 <= -2e-17) {
tmp = t_2;
} else if (t_1 <= 5e-135) {
tmp = -0.3333333333333333 * (-6.0 * (Math.cos(y) * Math.sqrt(x)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) t_2 = (2.0 * (1.0 * math.sqrt(x))) - ((-a / 3.0) / -b) tmp = 0 if t_1 <= -2e-17: tmp = t_2 elif t_1 <= 5e-135: tmp = -0.3333333333333333 * (-6.0 * (math.cos(y) * math.sqrt(x))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) t_2 = Float64(Float64(2.0 * Float64(1.0 * sqrt(x))) - Float64(Float64(Float64(-a) / 3.0) / Float64(-b))) tmp = 0.0 if (t_1 <= -2e-17) tmp = t_2; elseif (t_1 <= 5e-135) tmp = Float64(-0.3333333333333333 * Float64(-6.0 * Float64(cos(y) * sqrt(x)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); t_2 = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b); tmp = 0.0; if (t_1 <= -2e-17) tmp = t_2; elseif (t_1 <= 5e-135) tmp = -0.3333333333333333 * (-6.0 * (cos(y) * sqrt(x))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * N[(1.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[((-a) / 3.0), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-17], t$95$2, If[LessEqual[t$95$1, 5e-135], N[(-0.3333333333333333 * N[(-6.0 * N[(N[Cos[y], $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET t_2 = (((2) * ((1) * (sqrt(x)))) - (((- a) / (3)) / (- b))) IN LET tmp_1 = IF (t_1 <= (50000000000000001985507167852432203201864073009270934282334838895804405434924636201595581601317127124865915453397311986880495099637390737936955218295631622949608574881151133122005933230987646514395910495137769196891284713371188260829599029527232218620529419564825381937228364025149362357942145104430718424941631206062509613051447754372702547698281705379486083984375e-499)) THEN ((-333333333333333314829616256247390992939472198486328125e-54) * ((-6) * ((cos(y)) * (sqrt(x))))) ELSE t_2 ENDIF IN LET tmp = IF (t_1 <= (-20000000000000001430848481092438490170561123698464954523412728804032667540013790130615234375e-108)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := 2 \cdot \left(1 \cdot \sqrt{x}\right) - \frac{\frac{-a}{3}}{-b}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-135}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(-6 \cdot \left(\cos y \cdot \sqrt{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -2.0000000000000001e-17 or 5.0000000000000002e-135 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Applied rewrites69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in y around 0
Applied rewrites65.2%
if -2.0000000000000001e-17 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 5.0000000000000002e-135Initial program 69.9%
Applied rewrites66.7%
Taylor expanded in z around 0
Applied rewrites73.3%
Taylor expanded in a around 0
Applied rewrites28.5%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (- (* 2.0 (* 1.0 (sqrt x))) (/ (/ (- a) 3.0) (- b))))
double code(double x, double y, double z, double t, double a, double b) {
return (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b);
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = (2.0d0 * (1.0d0 * sqrt(x))) - ((-a / 3.0d0) / -b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (2.0 * (1.0 * Math.sqrt(x))) - ((-a / 3.0) / -b);
}
def code(x, y, z, t, a, b): return (2.0 * (1.0 * math.sqrt(x))) - ((-a / 3.0) / -b)
function code(x, y, z, t, a, b) return Float64(Float64(2.0 * Float64(1.0 * sqrt(x))) - Float64(Float64(Float64(-a) / 3.0) / Float64(-b))) end
function tmp = code(x, y, z, t, a, b) tmp = (2.0 * (1.0 * sqrt(x))) - ((-a / 3.0) / -b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(2.0 * N[(1.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[((-a) / 3.0), $MachinePrecision] / (-b)), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = ((2) * ((1) * (sqrt(x)))) - (((- a) / (3)) / (- b)) END code
2 \cdot \left(1 \cdot \sqrt{x}\right) - \frac{\frac{-a}{3}}{-b}
Initial program 69.9%
Applied rewrites69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in y around 0
Applied rewrites65.2%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (- (* (* 2.0 (sqrt x)) 1.0) (/ a (* b 3.0))))
double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * sqrt(x)) * 1.0) - (a / (b * 3.0));
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = ((2.0d0 * sqrt(x)) * 1.0d0) - (a / (b * 3.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * Math.sqrt(x)) * 1.0) - (a / (b * 3.0));
}
def code(x, y, z, t, a, b): return ((2.0 * math.sqrt(x)) * 1.0) - (a / (b * 3.0))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(2.0 * sqrt(x)) * 1.0) - Float64(a / Float64(b * 3.0))) end
function tmp = code(x, y, z, t, a, b) tmp = ((2.0 * sqrt(x)) * 1.0) - (a / (b * 3.0)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (((2) * (sqrt(x))) * (1)) - (a / (b * (3))) END code
\left(2 \cdot \sqrt{x}\right) \cdot 1 - \frac{a}{b \cdot 3}
Initial program 69.9%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in y around 0
Applied rewrites65.2%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (fma -0.3333333333333333 (/ a b) (* 2.0 (sqrt x))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(-0.3333333333333333, (a / b), (2.0 * sqrt(x)));
}
function code(x, y, z, t, a, b) return fma(-0.3333333333333333, Float64(a / b), Float64(2.0 * sqrt(x))) end
code[x_, y_, z_, t_, a_, b_] := N[(-0.3333333333333333 * N[(a / b), $MachinePrecision] + N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = ((-333333333333333314829616256247390992939472198486328125e-54) * (a / b)) + ((2) * (sqrt(x))) END code
\mathsf{fma}\left(-0.3333333333333333, \frac{a}{b}, 2 \cdot \sqrt{x}\right)
Initial program 69.9%
Applied rewrites64.3%
Taylor expanded in z around 0
Applied rewrites76.5%
Taylor expanded in y around 0
Applied rewrites65.1%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (* -0.3333333333333333 (fma -6.0 (sqrt x) (/ a b))))
double code(double x, double y, double z, double t, double a, double b) {
return -0.3333333333333333 * fma(-6.0, sqrt(x), (a / b));
}
function code(x, y, z, t, a, b) return Float64(-0.3333333333333333 * fma(-6.0, sqrt(x), Float64(a / b))) end
code[x_, y_, z_, t_, a_, b_] := N[(-0.3333333333333333 * N[(-6.0 * N[Sqrt[x], $MachinePrecision] + N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (-333333333333333314829616256247390992939472198486328125e-54) * (((-6) * (sqrt(x))) + (a / b)) END code
-0.3333333333333333 \cdot \mathsf{fma}\left(-6, \sqrt{x}, \frac{a}{b}\right)
Initial program 69.9%
Applied rewrites66.7%
Taylor expanded in z around 0
Applied rewrites73.3%
Taylor expanded in a around 0
Applied rewrites76.4%
Taylor expanded in y around 0
Applied rewrites65.1%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0))))
(if (<= t_1 -1e-25)
(/ (* -1.0 (/ a b)) 3.0)
(if (<= t_1 0.1)
(/ 1.0 (/ 0.5 (sqrt x)))
(* a (/ 1.0 (* b -3.0)))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = (-1.0 * (a / b)) / 3.0;
} else if (t_1 <= 0.1) {
tmp = 1.0 / (0.5 / sqrt(x));
} else {
tmp = a * (1.0 / (b * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / (b * 3.0d0)
if (t_1 <= (-1d-25)) then
tmp = ((-1.0d0) * (a / b)) / 3.0d0
else if (t_1 <= 0.1d0) then
tmp = 1.0d0 / (0.5d0 / sqrt(x))
else
tmp = a * (1.0d0 / (b * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = (-1.0 * (a / b)) / 3.0;
} else if (t_1 <= 0.1) {
tmp = 1.0 / (0.5 / Math.sqrt(x));
} else {
tmp = a * (1.0 / (b * -3.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) tmp = 0 if t_1 <= -1e-25: tmp = (-1.0 * (a / b)) / 3.0 elif t_1 <= 0.1: tmp = 1.0 / (0.5 / math.sqrt(x)) else: tmp = a * (1.0 / (b * -3.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) tmp = 0.0 if (t_1 <= -1e-25) tmp = Float64(Float64(-1.0 * Float64(a / b)) / 3.0); elseif (t_1 <= 0.1) tmp = Float64(1.0 / Float64(0.5 / sqrt(x))); else tmp = Float64(a * Float64(1.0 / Float64(b * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); tmp = 0.0; if (t_1 <= -1e-25) tmp = (-1.0 * (a / b)) / 3.0; elseif (t_1 <= 0.1) tmp = 1.0 / (0.5 / sqrt(x)); else tmp = a * (1.0 / (b * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-25], N[(N[(-1.0 * N[(a / b), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(1.0 / N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 / N[(b * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET tmp_1 = IF (t_1 <= (1000000000000000055511151231257827021181583404541015625e-55)) THEN ((1) / ((5e-1) / (sqrt(x)))) ELSE (a * ((1) / (b * (-3)))) ENDIF IN LET tmp = IF (t_1 <= (-1000000000000000038494869749191839081371989361591338301396127643500357819184021224145908490754663944244384765625e-136)) THEN (((-1) * (a / b)) / (3)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-25}:\\
\;\;\;\;\frac{-1 \cdot \frac{a}{b}}{3}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;\frac{1}{\frac{0.5}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{1}{b \cdot -3}\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -1e-25Initial program 69.9%
Applied rewrites69.9%
Taylor expanded in a around inf
Applied rewrites50.3%
if -1e-25 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 0.10000000000000001Initial program 69.9%
Applied rewrites69.8%
Taylor expanded in a around 0
Applied rewrites28.0%
Taylor expanded in z around 0
Applied rewrites28.6%
Taylor expanded in y around 0
Applied rewrites17.8%
if 0.10000000000000001 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites50.2%
Applied rewrites50.2%
Applied rewrites50.2%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0))))
(if (<= t_1 -1e-25)
(* a (/ -0.3333333333333333 b))
(if (<= t_1 0.1)
(/ 1.0 (/ 0.5 (sqrt x)))
(* a (/ 1.0 (* b -3.0)))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = a * (-0.3333333333333333 / b);
} else if (t_1 <= 0.1) {
tmp = 1.0 / (0.5 / sqrt(x));
} else {
tmp = a * (1.0 / (b * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / (b * 3.0d0)
if (t_1 <= (-1d-25)) then
tmp = a * ((-0.3333333333333333d0) / b)
else if (t_1 <= 0.1d0) then
tmp = 1.0d0 / (0.5d0 / sqrt(x))
else
tmp = a * (1.0d0 / (b * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = a * (-0.3333333333333333 / b);
} else if (t_1 <= 0.1) {
tmp = 1.0 / (0.5 / Math.sqrt(x));
} else {
tmp = a * (1.0 / (b * -3.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) tmp = 0 if t_1 <= -1e-25: tmp = a * (-0.3333333333333333 / b) elif t_1 <= 0.1: tmp = 1.0 / (0.5 / math.sqrt(x)) else: tmp = a * (1.0 / (b * -3.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) tmp = 0.0 if (t_1 <= -1e-25) tmp = Float64(a * Float64(-0.3333333333333333 / b)); elseif (t_1 <= 0.1) tmp = Float64(1.0 / Float64(0.5 / sqrt(x))); else tmp = Float64(a * Float64(1.0 / Float64(b * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); tmp = 0.0; if (t_1 <= -1e-25) tmp = a * (-0.3333333333333333 / b); elseif (t_1 <= 0.1) tmp = 1.0 / (0.5 / sqrt(x)); else tmp = a * (1.0 / (b * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-25], N[(a * N[(-0.3333333333333333 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(1.0 / N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 / N[(b * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET tmp_1 = IF (t_1 <= (1000000000000000055511151231257827021181583404541015625e-55)) THEN ((1) / ((5e-1) / (sqrt(x)))) ELSE (a * ((1) / (b * (-3)))) ENDIF IN LET tmp = IF (t_1 <= (-1000000000000000038494869749191839081371989361591338301396127643500357819184021224145908490754663944244384765625e-136)) THEN (a * ((-333333333333333314829616256247390992939472198486328125e-54) / b)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \frac{-0.3333333333333333}{b}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;\frac{1}{\frac{0.5}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{1}{b \cdot -3}\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -1e-25Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites50.2%
if -1e-25 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 0.10000000000000001Initial program 69.9%
Applied rewrites69.8%
Taylor expanded in a around 0
Applied rewrites28.0%
Taylor expanded in z around 0
Applied rewrites28.6%
Taylor expanded in y around 0
Applied rewrites17.8%
if 0.10000000000000001 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites50.2%
Applied rewrites50.2%
Applied rewrites50.2%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0))))
(if (<= t_1 -1e-25)
(* a (/ -0.3333333333333333 b))
(if (<= t_1 0.1)
(/ 1.0 (/ 0.5 (sqrt x)))
(/ -0.3333333333333333 (/ b a))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = a * (-0.3333333333333333 / b);
} else if (t_1 <= 0.1) {
tmp = 1.0 / (0.5 / sqrt(x));
} else {
tmp = -0.3333333333333333 / (b / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / (b * 3.0d0)
if (t_1 <= (-1d-25)) then
tmp = a * ((-0.3333333333333333d0) / b)
else if (t_1 <= 0.1d0) then
tmp = 1.0d0 / (0.5d0 / sqrt(x))
else
tmp = (-0.3333333333333333d0) / (b / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = a * (-0.3333333333333333 / b);
} else if (t_1 <= 0.1) {
tmp = 1.0 / (0.5 / Math.sqrt(x));
} else {
tmp = -0.3333333333333333 / (b / a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) tmp = 0 if t_1 <= -1e-25: tmp = a * (-0.3333333333333333 / b) elif t_1 <= 0.1: tmp = 1.0 / (0.5 / math.sqrt(x)) else: tmp = -0.3333333333333333 / (b / a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) tmp = 0.0 if (t_1 <= -1e-25) tmp = Float64(a * Float64(-0.3333333333333333 / b)); elseif (t_1 <= 0.1) tmp = Float64(1.0 / Float64(0.5 / sqrt(x))); else tmp = Float64(-0.3333333333333333 / Float64(b / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); tmp = 0.0; if (t_1 <= -1e-25) tmp = a * (-0.3333333333333333 / b); elseif (t_1 <= 0.1) tmp = 1.0 / (0.5 / sqrt(x)); else tmp = -0.3333333333333333 / (b / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-25], N[(a * N[(-0.3333333333333333 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(1.0 / N[(0.5 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 / N[(b / a), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET tmp_1 = IF (t_1 <= (1000000000000000055511151231257827021181583404541015625e-55)) THEN ((1) / ((5e-1) / (sqrt(x)))) ELSE ((-333333333333333314829616256247390992939472198486328125e-54) / (b / a)) ENDIF IN LET tmp = IF (t_1 <= (-1000000000000000038494869749191839081371989361591338301396127643500357819184021224145908490754663944244384765625e-136)) THEN (a * ((-333333333333333314829616256247390992939472198486328125e-54) / b)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \frac{-0.3333333333333333}{b}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;\frac{1}{\frac{0.5}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{b}{a}}\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -1e-25Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites50.2%
if -1e-25 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 0.10000000000000001Initial program 69.9%
Applied rewrites69.8%
Taylor expanded in a around 0
Applied rewrites28.0%
Taylor expanded in z around 0
Applied rewrites28.6%
Taylor expanded in y around 0
Applied rewrites17.8%
if 0.10000000000000001 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites50.2%
Applied rewrites50.2%
Applied rewrites50.2%
(FPCore (x y z t a b)
:precision binary64
:pre TRUE
(let* ((t_1 (/ a (* b 3.0))))
(if (<= t_1 -1e-25)
(* a (/ -0.3333333333333333 b))
(if (<= t_1 0.1)
(* -0.3333333333333333 (* -6.0 (sqrt x)))
(/ -0.3333333333333333 (/ b a))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = a * (-0.3333333333333333 / b);
} else if (t_1 <= 0.1) {
tmp = -0.3333333333333333 * (-6.0 * sqrt(x));
} else {
tmp = -0.3333333333333333 / (b / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / (b * 3.0d0)
if (t_1 <= (-1d-25)) then
tmp = a * ((-0.3333333333333333d0) / b)
else if (t_1 <= 0.1d0) then
tmp = (-0.3333333333333333d0) * ((-6.0d0) * sqrt(x))
else
tmp = (-0.3333333333333333d0) / (b / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double tmp;
if (t_1 <= -1e-25) {
tmp = a * (-0.3333333333333333 / b);
} else if (t_1 <= 0.1) {
tmp = -0.3333333333333333 * (-6.0 * Math.sqrt(x));
} else {
tmp = -0.3333333333333333 / (b / a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (b * 3.0) tmp = 0 if t_1 <= -1e-25: tmp = a * (-0.3333333333333333 / b) elif t_1 <= 0.1: tmp = -0.3333333333333333 * (-6.0 * math.sqrt(x)) else: tmp = -0.3333333333333333 / (b / a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(b * 3.0)) tmp = 0.0 if (t_1 <= -1e-25) tmp = Float64(a * Float64(-0.3333333333333333 / b)); elseif (t_1 <= 0.1) tmp = Float64(-0.3333333333333333 * Float64(-6.0 * sqrt(x))); else tmp = Float64(-0.3333333333333333 / Float64(b / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (b * 3.0); tmp = 0.0; if (t_1 <= -1e-25) tmp = a * (-0.3333333333333333 / b); elseif (t_1 <= 0.1) tmp = -0.3333333333333333 * (-6.0 * sqrt(x)); else tmp = -0.3333333333333333 / (b / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-25], N[(a * N[(-0.3333333333333333 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(-0.3333333333333333 * N[(-6.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 / N[(b / a), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = LET t_1 = (a / (b * (3))) IN LET tmp_1 = IF (t_1 <= (1000000000000000055511151231257827021181583404541015625e-55)) THEN ((-333333333333333314829616256247390992939472198486328125e-54) * ((-6) * (sqrt(x)))) ELSE ((-333333333333333314829616256247390992939472198486328125e-54) / (b / a)) ENDIF IN LET tmp = IF (t_1 <= (-1000000000000000038494869749191839081371989361591338301396127643500357819184021224145908490754663944244384765625e-136)) THEN (a * ((-333333333333333314829616256247390992939472198486328125e-54) / b)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \frac{-0.3333333333333333}{b}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;-0.3333333333333333 \cdot \left(-6 \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{b}{a}}\\
\end{array}
if (/.f64 a (*.f64 b #s(literal 3 binary64))) < -1e-25Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites50.2%
if -1e-25 < (/.f64 a (*.f64 b #s(literal 3 binary64))) < 0.10000000000000001Initial program 69.9%
Applied rewrites66.7%
Taylor expanded in z around 0
Applied rewrites73.3%
Taylor expanded in a around 0
Applied rewrites28.5%
Taylor expanded in y around 0
Applied rewrites17.7%
if 0.10000000000000001 < (/.f64 a (*.f64 b #s(literal 3 binary64))) Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites50.2%
Applied rewrites50.2%
Applied rewrites50.2%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (* a (/ -0.3333333333333333 b)))
double code(double x, double y, double z, double t, double a, double b) {
return a * (-0.3333333333333333 / b);
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = a * ((-0.3333333333333333d0) / b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a * (-0.3333333333333333 / b);
}
def code(x, y, z, t, a, b): return a * (-0.3333333333333333 / b)
function code(x, y, z, t, a, b) return Float64(a * Float64(-0.3333333333333333 / b)) end
function tmp = code(x, y, z, t, a, b) tmp = a * (-0.3333333333333333 / b); end
code[x_, y_, z_, t_, a_, b_] := N[(a * N[(-0.3333333333333333 / b), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = a * ((-333333333333333314829616256247390992939472198486328125e-54) / b) END code
a \cdot \frac{-0.3333333333333333}{b}
Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites50.2%
(FPCore (x y z t a b) :precision binary64 :pre TRUE (* -0.3333333333333333 (/ a b)))
double code(double x, double y, double z, double t, double a, double b) {
return -0.3333333333333333 * (a / b);
}
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
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 = (-0.3333333333333333d0) * (a / b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return -0.3333333333333333 * (a / b);
}
def code(x, y, z, t, a, b): return -0.3333333333333333 * (a / b)
function code(x, y, z, t, a, b) return Float64(-0.3333333333333333 * Float64(a / b)) end
function tmp = code(x, y, z, t, a, b) tmp = -0.3333333333333333 * (a / b); end
code[x_, y_, z_, t_, a_, b_] := N[(-0.3333333333333333 * N[(a / b), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf], b in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a, b: real): real = (-333333333333333314829616256247390992939472198486328125e-54) * (a / b) END code
-0.3333333333333333 \cdot \frac{a}{b}
Initial program 69.9%
Taylor expanded in a around inf
Applied rewrites50.2%
herbie shell --seed 2026092
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, K"
:precision binary64
(- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))