
(FPCore (x y z)
:precision binary64
(fmax
(-
(sqrt
(+ (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0)) (pow (* z 30.0) 2.0)))
25.0)
(-
(fabs
(+
(+
(* (sin (* x 30.0)) (cos (* y 30.0)))
(* (sin (* y 30.0)) (cos (* z 30.0))))
(* (sin (* z 30.0)) (cos (* x 30.0)))))
0.2)))
double code(double x, double y, double z) {
return fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = fmax((sqrt(((((x * 30.0d0) ** 2.0d0) + ((y * 30.0d0) ** 2.0d0)) + ((z * 30.0d0) ** 2.0d0))) - 25.0d0), (abs((((sin((x * 30.0d0)) * cos((y * 30.0d0))) + (sin((y * 30.0d0)) * cos((z * 30.0d0)))) + (sin((z * 30.0d0)) * cos((x * 30.0d0))))) - 0.2d0))
end function
public static double code(double x, double y, double z) {
return fmax((Math.sqrt(((Math.pow((x * 30.0), 2.0) + Math.pow((y * 30.0), 2.0)) + Math.pow((z * 30.0), 2.0))) - 25.0), (Math.abs((((Math.sin((x * 30.0)) * Math.cos((y * 30.0))) + (Math.sin((y * 30.0)) * Math.cos((z * 30.0)))) + (Math.sin((z * 30.0)) * Math.cos((x * 30.0))))) - 0.2));
}
def code(x, y, z): return fmax((math.sqrt(((math.pow((x * 30.0), 2.0) + math.pow((y * 30.0), 2.0)) + math.pow((z * 30.0), 2.0))) - 25.0), (math.fabs((((math.sin((x * 30.0)) * math.cos((y * 30.0))) + (math.sin((y * 30.0)) * math.cos((z * 30.0)))) + (math.sin((z * 30.0)) * math.cos((x * 30.0))))) - 0.2))
function code(x, y, z) return fmax(Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) end
function tmp = code(x, y, z) tmp = max((sqrt(((((x * 30.0) ^ 2.0) + ((y * 30.0) ^ 2.0)) + ((z * 30.0) ^ 2.0))) - 25.0), (abs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)); end
code[x_, y_, z_] := N[Max[N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(fmax
(-
(sqrt
(+ (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0)) (pow (* z 30.0) 2.0)))
25.0)
(-
(fabs
(+
(+
(* (sin (* x 30.0)) (cos (* y 30.0)))
(* (sin (* y 30.0)) (cos (* z 30.0))))
(* (sin (* z 30.0)) (cos (* x 30.0)))))
0.2)))
double code(double x, double y, double z) {
return fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = fmax((sqrt(((((x * 30.0d0) ** 2.0d0) + ((y * 30.0d0) ** 2.0d0)) + ((z * 30.0d0) ** 2.0d0))) - 25.0d0), (abs((((sin((x * 30.0d0)) * cos((y * 30.0d0))) + (sin((y * 30.0d0)) * cos((z * 30.0d0)))) + (sin((z * 30.0d0)) * cos((x * 30.0d0))))) - 0.2d0))
end function
public static double code(double x, double y, double z) {
return fmax((Math.sqrt(((Math.pow((x * 30.0), 2.0) + Math.pow((y * 30.0), 2.0)) + Math.pow((z * 30.0), 2.0))) - 25.0), (Math.abs((((Math.sin((x * 30.0)) * Math.cos((y * 30.0))) + (Math.sin((y * 30.0)) * Math.cos((z * 30.0)))) + (Math.sin((z * 30.0)) * Math.cos((x * 30.0))))) - 0.2));
}
def code(x, y, z): return fmax((math.sqrt(((math.pow((x * 30.0), 2.0) + math.pow((y * 30.0), 2.0)) + math.pow((z * 30.0), 2.0))) - 25.0), (math.fabs((((math.sin((x * 30.0)) * math.cos((y * 30.0))) + (math.sin((y * 30.0)) * math.cos((z * 30.0)))) + (math.sin((z * 30.0)) * math.cos((x * 30.0))))) - 0.2))
function code(x, y, z) return fmax(Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) end
function tmp = code(x, y, z) tmp = max((sqrt(((((x * 30.0) ^ 2.0) + ((y * 30.0) ^ 2.0)) + ((z * 30.0) ^ 2.0))) - 25.0), (abs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)); end
code[x_, y_, z_] := N[Max[N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right)
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(fabs (fma (cos (* -30.0 x)) (sin (* 30.0 z)) (sin (* 30.0 x))))
0.2)))
(if (<= x -3.5e+143)
(fmax (* -30.0 x) t_0)
(if (<= x 2.25e+127)
(fmax
(fma (hypot z y) 30.0 -25.0)
(-
(fabs
(+
(* (sin (* z 30.0)) (cos (* x 30.0)))
(+
(* (sin (* x 30.0)) (cos (* y 30.0)))
(* (sin (* y 30.0)) (cos (* z 30.0))))))
0.2))
(fmax (fma 30.0 x -25.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = fabs(fma(cos((-30.0 * x)), sin((30.0 * z)), sin((30.0 * x)))) - 0.2;
double tmp;
if (x <= -3.5e+143) {
tmp = fmax((-30.0 * x), t_0);
} else if (x <= 2.25e+127) {
tmp = fmax(fma(hypot(z, y), 30.0, -25.0), (fabs(((sin((z * 30.0)) * cos((x * 30.0))) + ((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))))) - 0.2));
} else {
tmp = fmax(fma(30.0, x, -25.0), t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(abs(fma(cos(Float64(-30.0 * x)), sin(Float64(30.0 * z)), sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (x <= -3.5e+143) tmp = fmax(Float64(-30.0 * x), t_0); elseif (x <= 2.25e+127) tmp = fmax(fma(hypot(z, y), 30.0, -25.0), Float64(abs(Float64(Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))) + Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))))) - 0.2)); else tmp = fmax(fma(30.0, x, -25.0), t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -3.5e+143], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$0], $MachinePrecision], If[LessEqual[x, 2.25e+127], N[Max[N[(N[Sqrt[z ^ 2 + y ^ 2], $MachinePrecision] * 30.0 + -25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(30.0 * x + -25.0), $MachinePrecision], t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), \sin \left(30 \cdot z\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_0\right)\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+127}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(\mathsf{hypot}\left(z, y\right), 30, -25\right), \left|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(30, x, -25\right), t\_0\right)\\
\end{array}
\end{array}
if x < -3.50000000000000008e143Initial program 16.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6416.0
Applied rewrites16.0%
Taylor expanded in x around -inf
lower-*.f6478.6
Applied rewrites78.6%
if -3.50000000000000008e143 < x < 2.25000000000000017e127Initial program 61.0%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.9
Applied rewrites60.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6490.0
Applied rewrites90.0%
Taylor expanded in x around 0
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6490.0
Applied rewrites90.0%
if 2.25000000000000017e127 < x Initial program 16.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6416.7
Applied rewrites16.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6479.8
Applied rewrites79.8%
Taylor expanded in x around 0
Applied rewrites79.9%
Final simplification87.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= x -3.5e+143)
(fmax (* -30.0 x) t_1)
(if (<= x 2.25e+127)
(fmax
(fma (hypot z y) 30.0 -25.0)
(- (fabs (fma (sin (* 30.0 y)) (cos (* -30.0 z)) t_0)) 0.2))
(fmax (fma 30.0 x -25.0) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (x <= -3.5e+143) {
tmp = fmax((-30.0 * x), t_1);
} else if (x <= 2.25e+127) {
tmp = fmax(fma(hypot(z, y), 30.0, -25.0), (fabs(fma(sin((30.0 * y)), cos((-30.0 * z)), t_0)) - 0.2));
} else {
tmp = fmax(fma(30.0, x, -25.0), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (x <= -3.5e+143) tmp = fmax(Float64(-30.0 * x), t_1); elseif (x <= 2.25e+127) tmp = fmax(fma(hypot(z, y), 30.0, -25.0), Float64(abs(fma(sin(Float64(30.0 * y)), cos(Float64(-30.0 * z)), t_0)) - 0.2)); else tmp = fmax(fma(30.0, x, -25.0), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -3.5e+143], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[x, 2.25e+127], N[Max[N[(N[Sqrt[z ^ 2 + y ^ 2], $MachinePrecision] * 30.0 + -25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(-30.0 * z), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(30.0 * x + -25.0), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_1\right)\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+127}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(\mathsf{hypot}\left(z, y\right), 30, -25\right), \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(30, x, -25\right), t\_1\right)\\
\end{array}
\end{array}
if x < -3.50000000000000008e143Initial program 16.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6416.0
Applied rewrites16.0%
Taylor expanded in x around -inf
lower-*.f6478.6
Applied rewrites78.6%
if -3.50000000000000008e143 < x < 2.25000000000000017e127Initial program 61.0%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.9
Applied rewrites60.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6490.0
Applied rewrites90.0%
Taylor expanded in x around 0
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6490.0
Applied rewrites90.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6489.1
Applied rewrites89.1%
if 2.25000000000000017e127 < x Initial program 16.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6416.7
Applied rewrites16.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6479.8
Applied rewrites79.8%
Taylor expanded in x around 0
Applied rewrites79.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= y -2.4e+152)
(fmax (* -30.0 y) t_1)
(if (<= y 1.26e+129)
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (cos (* -30.0 z)) t_0)) 0.2))
(fmax (* (- 30.0 (/ 25.0 y)) y) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -2.4e+152) {
tmp = fmax((-30.0 * y), t_1);
} else if (y <= 1.26e+129) {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), cos((-30.0 * z)), t_0)) - 0.2));
} else {
tmp = fmax(((30.0 - (25.0 / y)) * y), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -2.4e+152) tmp = fmax(Float64(-30.0 * y), t_1); elseif (y <= 1.26e+129) tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), cos(Float64(-30.0 * z)), t_0)) - 0.2)); else tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / y)) * y), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -2.4e+152], N[Max[N[(-30.0 * y), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[y, 1.26e+129], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(-30.0 * z), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, t\_1\right)\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+129}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{y}\right) \cdot y, t\_1\right)\\
\end{array}
\end{array}
if y < -2.3999999999999999e152Initial program 12.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6412.7
Applied rewrites12.7%
Taylor expanded in y around -inf
lower-*.f6477.9
Applied rewrites77.9%
if -2.3999999999999999e152 < y < 1.26e129Initial program 61.1%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6461.0
Applied rewrites61.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
if 1.26e129 < y Initial program 12.6%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6412.6
Applied rewrites12.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6486.0
Applied rewrites86.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= y -2.4e+152)
(fmax (* -30.0 y) t_1)
(if (<= y 1.26e+129)
(fmax
(- (sqrt (* 900.0 (fma x x (fma z z (* y y))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (cos (* -30.0 z)) t_0)) 0.2))
(fmax (* (- 30.0 (/ 25.0 y)) y) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -2.4e+152) {
tmp = fmax((-30.0 * y), t_1);
} else if (y <= 1.26e+129) {
tmp = fmax((sqrt((900.0 * fma(x, x, fma(z, z, (y * y))))) - 25.0), (fabs(fma(sin((30.0 * y)), cos((-30.0 * z)), t_0)) - 0.2));
} else {
tmp = fmax(((30.0 - (25.0 / y)) * y), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -2.4e+152) tmp = fmax(Float64(-30.0 * y), t_1); elseif (y <= 1.26e+129) tmp = fmax(Float64(sqrt(Float64(900.0 * fma(x, x, fma(z, z, Float64(y * y))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), cos(Float64(-30.0 * z)), t_0)) - 0.2)); else tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / y)) * y), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -2.4e+152], N[Max[N[(-30.0 * y), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[y, 1.26e+129], N[Max[N[(N[Sqrt[N[(900.0 * N[(x * x + N[(z * z + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(-30.0 * z), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, t\_1\right)\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+129}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{900 \cdot \mathsf{fma}\left(x, x, \mathsf{fma}\left(z, z, y \cdot y\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{y}\right) \cdot y, t\_1\right)\\
\end{array}
\end{array}
if y < -2.3999999999999999e152Initial program 12.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6412.7
Applied rewrites12.7%
Taylor expanded in y around -inf
lower-*.f6477.9
Applied rewrites77.9%
if -2.3999999999999999e152 < y < 1.26e129Initial program 61.1%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6461.0
Applied rewrites61.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
lift-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-outN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6460.5
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
if 1.26e129 < y Initial program 12.6%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6412.6
Applied rewrites12.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6486.0
Applied rewrites86.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(fabs (fma (cos (* -30.0 x)) (sin (* 30.0 z)) (sin (* 30.0 x))))
0.2)))
(if (<= y -2.4e+152)
(fmax (* -30.0 y) t_0)
(if (<= y 1.26e+129)
(fmax (- (sqrt (* 900.0 (fma x x (fma y y (* z z))))) 25.0) t_0)
(fmax (* (- 30.0 (/ 25.0 y)) y) t_0)))))
double code(double x, double y, double z) {
double t_0 = fabs(fma(cos((-30.0 * x)), sin((30.0 * z)), sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -2.4e+152) {
tmp = fmax((-30.0 * y), t_0);
} else if (y <= 1.26e+129) {
tmp = fmax((sqrt((900.0 * fma(x, x, fma(y, y, (z * z))))) - 25.0), t_0);
} else {
tmp = fmax(((30.0 - (25.0 / y)) * y), t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(abs(fma(cos(Float64(-30.0 * x)), sin(Float64(30.0 * z)), sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -2.4e+152) tmp = fmax(Float64(-30.0 * y), t_0); elseif (y <= 1.26e+129) tmp = fmax(Float64(sqrt(Float64(900.0 * fma(x, x, fma(y, y, Float64(z * z))))) - 25.0), t_0); else tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / y)) * y), t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -2.4e+152], N[Max[N[(-30.0 * y), $MachinePrecision], t$95$0], $MachinePrecision], If[LessEqual[y, 1.26e+129], N[Max[N[(N[Sqrt[N[(900.0 * N[(x * x + N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), \sin \left(30 \cdot z\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, t\_0\right)\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+129}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{900 \cdot \mathsf{fma}\left(x, x, \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{y}\right) \cdot y, t\_0\right)\\
\end{array}
\end{array}
if y < -2.3999999999999999e152Initial program 12.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6412.7
Applied rewrites12.7%
Taylor expanded in y around -inf
lower-*.f6477.9
Applied rewrites77.9%
if -2.3999999999999999e152 < y < 1.26e129Initial program 61.1%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6460.6
Applied rewrites60.6%
Applied rewrites60.5%
if 1.26e129 < y Initial program 12.6%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6412.6
Applied rewrites12.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6486.0
Applied rewrites86.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 x)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) (sin (* 30.0 z)) t_0)) 0.2)))
(if (<= x -11000.0)
(fmax
(- (* -30.0 x) 25.0)
(- (fabs (fma t_0 (cos (* -30.0 y)) (sin (* 30.0 y)))) 0.2))
(if (<= x 1.6e+28)
(fmax (- (sqrt (* (fma z z (* y y)) 900.0)) 25.0) t_1)
(fmax (fma 30.0 x -25.0) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * x));
double t_1 = fabs(fma(cos((-30.0 * x)), sin((30.0 * z)), t_0)) - 0.2;
double tmp;
if (x <= -11000.0) {
tmp = fmax(((-30.0 * x) - 25.0), (fabs(fma(t_0, cos((-30.0 * y)), sin((30.0 * y)))) - 0.2));
} else if (x <= 1.6e+28) {
tmp = fmax((sqrt((fma(z, z, (y * y)) * 900.0)) - 25.0), t_1);
} else {
tmp = fmax(fma(30.0, x, -25.0), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * x)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), sin(Float64(30.0 * z)), t_0)) - 0.2) tmp = 0.0 if (x <= -11000.0) tmp = fmax(Float64(Float64(-30.0 * x) - 25.0), Float64(abs(fma(t_0, cos(Float64(-30.0 * y)), sin(Float64(30.0 * y)))) - 0.2)); elseif (x <= 1.6e+28) tmp = fmax(Float64(sqrt(Float64(fma(z, z, Float64(y * y)) * 900.0)) - 25.0), t_1); else tmp = fmax(fma(30.0, x, -25.0), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -11000.0], N[Max[N[(N[(-30.0 * x), $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(t$95$0 * N[Cos[N[(-30.0 * y), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.6e+28], N[Max[N[(N[Sqrt[N[(N[(z * z + N[(y * y), $MachinePrecision]), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], N[Max[N[(30.0 * x + -25.0), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot x\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), \sin \left(30 \cdot z\right), t\_0\right)\right| - 0.2\\
\mathbf{if}\;x \leq -11000:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(t\_0, \cos \left(-30 \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - 0.2\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z, z, y \cdot y\right) \cdot 900} - 25, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(30, x, -25\right), t\_1\right)\\
\end{array}
\end{array}
if x < -11000Initial program 31.2%
Taylor expanded in x around -inf
lower-*.f6457.6
Applied rewrites57.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6457.6
Applied rewrites57.6%
if -11000 < x < 1.6e28Initial program 66.3%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6465.4
Applied rewrites65.4%
Taylor expanded in x around 0
distribute-lft-inN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6464.6
Applied rewrites64.6%
if 1.6e28 < x Initial program 29.1%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6429.1
Applied rewrites29.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6463.3
Applied rewrites63.3%
Taylor expanded in x around 0
Applied rewrites63.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(fabs (fma (cos (* -30.0 x)) (sin (* 30.0 z)) (sin (* 30.0 x))))
0.2)))
(if (<= y -1.05e+85)
(fmax (* -30.0 y) t_0)
(if (<= y 5.5e+38)
(fmax (- (sqrt (* (fma z z (* x x)) 900.0)) 25.0) t_0)
(fmax (* (- 30.0 (/ 25.0 y)) y) t_0)))))
double code(double x, double y, double z) {
double t_0 = fabs(fma(cos((-30.0 * x)), sin((30.0 * z)), sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -1.05e+85) {
tmp = fmax((-30.0 * y), t_0);
} else if (y <= 5.5e+38) {
tmp = fmax((sqrt((fma(z, z, (x * x)) * 900.0)) - 25.0), t_0);
} else {
tmp = fmax(((30.0 - (25.0 / y)) * y), t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(abs(fma(cos(Float64(-30.0 * x)), sin(Float64(30.0 * z)), sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -1.05e+85) tmp = fmax(Float64(-30.0 * y), t_0); elseif (y <= 5.5e+38) tmp = fmax(Float64(sqrt(Float64(fma(z, z, Float64(x * x)) * 900.0)) - 25.0), t_0); else tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / y)) * y), t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -1.05e+85], N[Max[N[(-30.0 * y), $MachinePrecision], t$95$0], $MachinePrecision], If[LessEqual[y, 5.5e+38], N[Max[N[(N[Sqrt[N[(N[(z * z + N[(x * x), $MachinePrecision]), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), \sin \left(30 \cdot z\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, t\_0\right)\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z, z, x \cdot x\right) \cdot 900} - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{y}\right) \cdot y, t\_0\right)\\
\end{array}
\end{array}
if y < -1.05000000000000005e85Initial program 29.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6429.2
Applied rewrites29.2%
Taylor expanded in y around -inf
lower-*.f6474.3
Applied rewrites74.3%
if -1.05000000000000005e85 < y < 5.5000000000000003e38Initial program 59.6%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6458.8
Applied rewrites58.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-sqrt.f64N/A
distribute-lft-outN/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6454.2
Applied rewrites54.2%
if 5.5000000000000003e38 < y Initial program 33.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6433.7
Applied rewrites33.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6474.5
Applied rewrites74.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= y -1.02e+85)
(fmax (* -30.0 y) t_1)
(if (<= y 2.5e+109)
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2))
(fmax (* (- 30.0 (/ 25.0 y)) y) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -1.02e+85) {
tmp = fmax((-30.0 * y), t_1);
} else if (y <= 2.5e+109) {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
} else {
tmp = fmax(((30.0 - (25.0 / y)) * y), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -1.02e+85) tmp = fmax(Float64(-30.0 * y), t_1); elseif (y <= 2.5e+109) tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); else tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / y)) * y), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -1.02e+85], N[Max[N[(-30.0 * y), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[y, 2.5e+109], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, t\_1\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{y}\right) \cdot y, t\_1\right)\\
\end{array}
\end{array}
if y < -1.02e85Initial program 30.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6430.7
Applied rewrites30.7%
Taylor expanded in y around -inf
lower-*.f6472.9
Applied rewrites72.9%
if -1.02e85 < y < 2.5000000000000001e109Initial program 59.8%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
Taylor expanded in z around 0
Applied rewrites53.7%
if 2.5000000000000001e109 < y Initial program 21.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6421.2
Applied rewrites21.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6483.3
Applied rewrites83.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= y -1.02e+85)
(fmax (* -30.0 y) t_1)
(if (<= y 2.5e+109)
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2))
(fmax (fma 30.0 y -25.0) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -1.02e+85) {
tmp = fmax((-30.0 * y), t_1);
} else if (y <= 2.5e+109) {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
} else {
tmp = fmax(fma(30.0, y, -25.0), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -1.02e+85) tmp = fmax(Float64(-30.0 * y), t_1); elseif (y <= 2.5e+109) tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); else tmp = fmax(fma(30.0, y, -25.0), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -1.02e+85], N[Max[N[(-30.0 * y), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[y, 2.5e+109], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(30.0 * y + -25.0), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, t\_1\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(30, y, -25\right), t\_1\right)\\
\end{array}
\end{array}
if y < -1.02e85Initial program 30.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6430.7
Applied rewrites30.7%
Taylor expanded in y around -inf
lower-*.f6472.9
Applied rewrites72.9%
if -1.02e85 < y < 2.5000000000000001e109Initial program 59.8%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
Taylor expanded in z around 0
Applied rewrites53.7%
if 2.5000000000000001e109 < y Initial program 21.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6421.2
Applied rewrites21.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6483.3
Applied rewrites83.3%
Taylor expanded in y around 0
Applied rewrites83.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= x -4.6e+147)
(fmax (* -30.0 x) t_1)
(if (<= x 5.2e+119)
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2))
(fmax (fma 30.0 x -25.0) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (x <= -4.6e+147) {
tmp = fmax((-30.0 * x), t_1);
} else if (x <= 5.2e+119) {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
} else {
tmp = fmax(fma(30.0, x, -25.0), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (x <= -4.6e+147) tmp = fmax(Float64(-30.0 * x), t_1); elseif (x <= 5.2e+119) tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); else tmp = fmax(fma(30.0, x, -25.0), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -4.6e+147], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[x, 5.2e+119], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(30.0 * x + -25.0), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_1\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(30, x, -25\right), t\_1\right)\\
\end{array}
\end{array}
if x < -4.5999999999999998e147Initial program 13.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6413.2
Applied rewrites13.2%
Taylor expanded in x around -inf
lower-*.f6477.8
Applied rewrites77.8%
if -4.5999999999999998e147 < x < 5.2e119Initial program 61.6%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6461.5
Applied rewrites61.5%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6460.9
Applied rewrites60.9%
Taylor expanded in z around 0
Applied rewrites54.3%
if 5.2e119 < x Initial program 18.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6418.0
Applied rewrites18.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6477.0
Applied rewrites77.0%
Taylor expanded in x around 0
Applied rewrites77.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= x -4.6e+147)
(fmax (* -30.0 x) t_1)
(if (<= x 5.2e+119)
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2))
(fmax (* 30.0 x) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (x <= -4.6e+147) {
tmp = fmax((-30.0 * x), t_1);
} else if (x <= 5.2e+119) {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
} else {
tmp = fmax((30.0 * x), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (x <= -4.6e+147) tmp = fmax(Float64(-30.0 * x), t_1); elseif (x <= 5.2e+119) tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); else tmp = fmax(Float64(30.0 * x), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -4.6e+147], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[x, 5.2e+119], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(30.0 * x), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_1\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(30 \cdot x, t\_1\right)\\
\end{array}
\end{array}
if x < -4.5999999999999998e147Initial program 13.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6413.2
Applied rewrites13.2%
Taylor expanded in x around -inf
lower-*.f6477.8
Applied rewrites77.8%
if -4.5999999999999998e147 < x < 5.2e119Initial program 61.6%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6461.5
Applied rewrites61.5%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6460.9
Applied rewrites60.9%
Taylor expanded in z around 0
Applied rewrites54.3%
if 5.2e119 < x Initial program 18.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6418.0
Applied rewrites18.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6477.0
Applied rewrites77.0%
Taylor expanded in x around inf
Applied rewrites77.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z)))
(t_1 (- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2)))
(if (<= z -1.7e+75)
(fmax (* -30.0 z) t_1)
(if (<= z 1.16e+33)
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2))
(fmax (* 30.0 z) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double t_1 = fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2;
double tmp;
if (z <= -1.7e+75) {
tmp = fmax((-30.0 * z), t_1);
} else if (z <= 1.16e+33) {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
} else {
tmp = fmax((30.0 * z), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) t_1 = Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (z <= -1.7e+75) tmp = fmax(Float64(-30.0 * z), t_1); elseif (z <= 1.16e+33) tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); else tmp = fmax(Float64(30.0 * z), t_1); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[z, -1.7e+75], N[Max[N[(-30.0 * z), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[z, 1.16e+33], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(30.0 * z), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
t_1 := \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+75}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, t\_1\right)\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(30 \cdot z, t\_1\right)\\
\end{array}
\end{array}
if z < -1.70000000000000006e75Initial program 17.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
Taylor expanded in z around -inf
lower-*.f6476.7
Applied rewrites76.7%
if -1.70000000000000006e75 < z < 1.16000000000000001e33Initial program 59.5%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6459.4
Applied rewrites59.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6458.8
Applied rewrites58.8%
Taylor expanded in z around 0
Applied rewrites56.7%
if 1.16000000000000001e33 < z Initial program 28.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6428.5
Applied rewrites28.5%
Taylor expanded in z around inf
lower-*.f6462.6
Applied rewrites62.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z))))
(if (<= y -1.02e+85)
(fmax
(* -30.0 y)
(- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2))
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double tmp;
if (y <= -1.02e+85) {
tmp = fmax((-30.0 * y), (fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2));
} else {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) tmp = 0.0 if (y <= -1.02e+85) tmp = fmax(Float64(-30.0 * y), Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2)); else tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.02e+85], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\end{array}
\end{array}
if y < -1.02e85Initial program 30.7%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6430.7
Applied rewrites30.7%
Taylor expanded in y around -inf
lower-*.f6472.9
Applied rewrites72.9%
if -1.02e85 < y Initial program 52.4%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6452.4
Applied rewrites52.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6451.9
Applied rewrites51.9%
Taylor expanded in z around 0
Applied rewrites47.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 z))))
(if (<= x -4.6e+147)
(fmax
(* -30.0 x)
(- (fabs (fma (cos (* -30.0 x)) t_0 (sin (* 30.0 x)))) 0.2))
(fmax
(- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
(- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) t_0)) 0.2)))))
double code(double x, double y, double z) {
double t_0 = sin((30.0 * z));
double tmp;
if (x <= -4.6e+147) {
tmp = fmax((-30.0 * x), (fabs(fma(cos((-30.0 * x)), t_0, sin((30.0 * x)))) - 0.2));
} else {
tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), t_0)) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * z)) tmp = 0.0 if (x <= -4.6e+147) tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, sin(Float64(30.0 * x)))) - 0.2)); else tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), t_0)) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -4.6e+147], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot z\right)\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), t\_0\right)\right| - 0.2\right)\\
\end{array}
\end{array}
if x < -4.5999999999999998e147Initial program 13.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6413.2
Applied rewrites13.2%
Taylor expanded in x around -inf
lower-*.f6477.8
Applied rewrites77.8%
if -4.5999999999999998e147 < x Initial program 53.1%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6453.0
Applied rewrites53.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6452.6
Applied rewrites52.6%
Taylor expanded in z around 0
Applied rewrites47.2%
(FPCore (x y z) :precision binary64 (fmax (- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0) (- (fabs (fma (sin (* 30.0 y)) (fma (* z z) -450.0 1.0) (sin (* 30.0 z)))) 0.2)))
double code(double x, double y, double z) {
return fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(fma(sin((30.0 * y)), fma((z * z), -450.0, 1.0), sin((30.0 * z)))) - 0.2));
}
function code(x, y, z) return fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), fma(Float64(z * z), -450.0, 1.0), sin(Float64(30.0 * z)))) - 0.2)) end
code[x_, y_, z_] := N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * N[(N[(z * z), $MachinePrecision] * -450.0 + 1.0), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \mathsf{fma}\left(z \cdot z, -450, 1\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)
\end{array}
Initial program 48.4%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
lift-pow.f64N/A
lift-*.f64N/A
unpow-prod-downN/A
distribute-rgt-outN/A
lower-*.f64N/A
metadata-evalN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6448.4
Applied rewrites48.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
cos-neg-revN/A
lower-cos.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6448.0
Applied rewrites48.0%
Taylor expanded in z around 0
Applied rewrites43.2%
herbie shell --seed 2025015
(FPCore (x y z)
:name "Gyroid sphere"
:precision binary64
(fmax (- (sqrt (+ (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0)) (pow (* z 30.0) 2.0))) 25.0) (- (fabs (+ (+ (* (sin (* x 30.0)) (cos (* y 30.0))) (* (sin (* y 30.0)) (cos (* z 30.0)))) (* (sin (* z 30.0)) (cos (* x 30.0))))) 0.2)))