
(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]
\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)
Herbie found 12 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]
\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)
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* 30.0 y))))
(if (<= y -1.7e-5)
(fmax
(* -30.0 y)
(-
(fabs (+ (fma 30.0 x (* 30.0 (* y (cos (* 30.0 z))))) (sin (* 30.0 z))))
0.2))
(if (<= y 7.2e-29)
(fmax
(* z (- 30.0 (* 25.0 (/ 1.0 z))))
(- (fabs (+ t_0 (* 30.0 (* x (cos (* 30.0 y)))))) 0.2))
(if (<= y 9.2e+88)
(fmax
(- (sqrt (fma (fma y y (* x x)) 900.0 (* (* 900.0 z) z))) 25.0)
(- (fabs t_0) 0.2))
(fmax (* -30.0 x) (- (fabs (* 30.0 y)) 0.2)))))))double code(double x, double y, double z) {
double t_0 = sin((30.0 * y));
double tmp;
if (y <= -1.7e-5) {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * cos((30.0 * z))))) + sin((30.0 * z)))) - 0.2));
} else if (y <= 7.2e-29) {
tmp = fmax((z * (30.0 - (25.0 * (1.0 / z)))), (fabs((t_0 + (30.0 * (x * cos((30.0 * y)))))) - 0.2));
} else if (y <= 9.2e+88) {
tmp = fmax((sqrt(fma(fma(y, y, (x * x)), 900.0, ((900.0 * z) * z))) - 25.0), (fabs(t_0) - 0.2));
} else {
tmp = fmax((-30.0 * x), (fabs((30.0 * y)) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(30.0 * y)) tmp = 0.0 if (y <= -1.7e-5) tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * cos(Float64(30.0 * z))))) + sin(Float64(30.0 * z)))) - 0.2)); elseif (y <= 7.2e-29) tmp = fmax(Float64(z * Float64(30.0 - Float64(25.0 * Float64(1.0 / z)))), Float64(abs(Float64(t_0 + Float64(30.0 * Float64(x * cos(Float64(30.0 * y)))))) - 0.2)); elseif (y <= 9.2e+88) tmp = fmax(Float64(sqrt(fma(fma(y, y, Float64(x * x)), 900.0, Float64(Float64(900.0 * z) * z))) - 25.0), Float64(abs(t_0) - 0.2)); else tmp = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * y)) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.7e-5], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 7.2e-29], N[Max[N[(z * N[(30.0 - N[(25.0 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(t$95$0 + N[(30.0 * N[(x * N[Cos[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 9.2e+88], N[Max[N[(N[Sqrt[N[(N[(y * y + N[(x * x), $MachinePrecision]), $MachinePrecision] * 900.0 + N[(N[(900.0 * z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[t$95$0], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \sin \left(30 \cdot y\right)\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot \cos \left(30 \cdot z\right)\right)\right) + \sin \left(30 \cdot z\right)\right| - 0.2\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{max}\left(z \cdot \left(30 - 25 \cdot \frac{1}{z}\right), \left|t\_0 + 30 \cdot \left(x \cdot \cos \left(30 \cdot y\right)\right)\right| - 0.2\right)\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+88}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(y, y, x \cdot x\right), 900, \left(900 \cdot z\right) \cdot z\right)} - 25, \left|t\_0\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|30 \cdot y\right| - 0.2\right)\\
\end{array}
if y < -1.7e-5Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
if -1.7e-5 < y < 7.19999999999999948e-29Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f6429.6
Applied rewrites29.6%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6449.2
Applied rewrites49.2%
if 7.19999999999999948e-29 < y < 9.2000000000000007e88Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
lift-+.f64N/A
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
lift-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6446.2
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
Applied rewrites46.1%
if 9.2000000000000007e88 < y Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around -inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around 0
lower-*.f6443.8
Applied rewrites43.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(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))))
(if (<= t_0 1e+153)
t_0
(fmax
(* -30.0 y)
(-
(fabs (+ (fma 30.0 x (* 30.0 (* y (cos (* 30.0 z))))) (sin (* 30.0 z))))
0.2)))))double code(double x, double y, double z) {
double t_0 = 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 tmp;
if (t_0 <= 1e+153) {
tmp = t_0;
} else {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * cos((30.0 * z))))) + sin((30.0 * z)))) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= 1e+153) tmp = t_0; else tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * cos(Float64(30.0 * z))))) + sin(Float64(30.0 * z)))) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, 1e+153], t$95$0, N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_0 := \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)\\
\mathbf{if}\;t\_0 \leq 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot \cos \left(30 \cdot z\right)\right)\right) + \sin \left(30 \cdot z\right)\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z)
:precision binary64
(let* ((t_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)))
(if (<=
(fmax
(-
(sqrt
(+
(+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
(pow (* z 30.0) 2.0)))
25.0)
t_0)
1e+153)
(fmax
(-
(sqrt (fma (* (* z 30.0) 30.0) z (fma (* x x) 900.0 (* (* y y) 900.0))))
25.0)
t_0)
(fmax
(* -30.0 y)
(-
(fabs (+ (fma 30.0 x (* 30.0 (* y (cos (* 30.0 z))))) (sin (* 30.0 z))))
0.2)))))double code(double x, double y, double z) {
double t_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 tmp;
if (fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), t_0) <= 1e+153) {
tmp = fmax((sqrt(fma(((z * 30.0) * 30.0), z, fma((x * x), 900.0, ((y * y) * 900.0)))) - 25.0), t_0);
} else {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * cos((30.0 * z))))) + sin((30.0 * z)))) - 0.2));
}
return tmp;
}
function code(x, y, z) t_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) tmp = 0.0 if (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), t_0) <= 1e+153) tmp = fmax(Float64(sqrt(fma(Float64(Float64(z * 30.0) * 30.0), z, fma(Float64(x * x), 900.0, Float64(Float64(y * y) * 900.0)))) - 25.0), t_0); else tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * cos(Float64(30.0 * z))))) + sin(Float64(30.0 * z)))) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[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], t$95$0], $MachinePrecision], 1e+153], N[Max[N[(N[Sqrt[N[(N[(N[(z * 30.0), $MachinePrecision] * 30.0), $MachinePrecision] * z + N[(N[(x * x), $MachinePrecision] * 900.0 + N[(N[(y * y), $MachinePrecision] * 900.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_0 := \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\\
\mathbf{if}\;\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, t\_0\right) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(\left(z \cdot 30\right) \cdot 30, z, \mathsf{fma}\left(x \cdot x, 900, \left(y \cdot y\right) \cdot 900\right)\right)} - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot \cos \left(30 \cdot z\right)\right)\right) + \sin \left(30 \cdot z\right)\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
lift-+.f64N/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6446.9
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval46.8
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval46.8
Applied rewrites46.8%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* z 30.0))) (t_1 (sin (* y 30.0))))
(if (<=
(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))) (* t_1 (cos (* z 30.0))))
(* t_0 (cos (* x 30.0)))))
0.2))
1e+153)
(fmax
(-
(fabs
(fma
(cos (* -30.0 x))
t_0
(fma (cos (* -30.0 z)) t_1 (* (cos (* -30.0 y)) (sin (* 30.0 x))))))
0.2)
(-
(sqrt (fma (* z z) 900.0 (fma (* x x) 900.0 (* (* y y) 900.0))))
25.0))
(fmax
(* -30.0 y)
(-
(fabs (+ (fma 30.0 x (* 30.0 (* y (cos (* 30.0 z))))) (sin (* 30.0 z))))
0.2)))))double code(double x, double y, double z) {
double t_0 = sin((z * 30.0));
double t_1 = sin((y * 30.0));
double tmp;
if (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))) + (t_1 * cos((z * 30.0)))) + (t_0 * cos((x * 30.0))))) - 0.2)) <= 1e+153) {
tmp = fmax((fabs(fma(cos((-30.0 * x)), t_0, fma(cos((-30.0 * z)), t_1, (cos((-30.0 * y)) * sin((30.0 * x)))))) - 0.2), (sqrt(fma((z * z), 900.0, fma((x * x), 900.0, ((y * y) * 900.0)))) - 25.0));
} else {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * cos((30.0 * z))))) + sin((30.0 * z)))) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(z * 30.0)) t_1 = sin(Float64(y * 30.0)) tmp = 0.0 if (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(t_1 * cos(Float64(z * 30.0)))) + Float64(t_0 * cos(Float64(x * 30.0))))) - 0.2)) <= 1e+153) tmp = fmax(Float64(abs(fma(cos(Float64(-30.0 * x)), t_0, fma(cos(Float64(-30.0 * z)), t_1, Float64(cos(Float64(-30.0 * y)) * sin(Float64(30.0 * x)))))) - 0.2), Float64(sqrt(fma(Float64(z * z), 900.0, fma(Float64(x * x), 900.0, Float64(Float64(y * y) * 900.0)))) - 25.0)); else tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * cos(Float64(30.0 * z))))) + sin(Float64(30.0 * z)))) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[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[(t$95$1 * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 1e+153], N[Max[N[(N[Abs[N[(N[Cos[N[(-30.0 * x), $MachinePrecision]], $MachinePrecision] * t$95$0 + N[(N[Cos[N[(-30.0 * z), $MachinePrecision]], $MachinePrecision] * t$95$1 + N[(N[Cos[N[(-30.0 * y), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision], N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] * 900.0 + N[(N[(x * x), $MachinePrecision] * 900.0 + N[(N[(y * y), $MachinePrecision] * 900.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_0 := \sin \left(z \cdot 30\right)\\
t_1 := \sin \left(y \cdot 30\right)\\
\mathbf{if}\;\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) + t\_1 \cdot \cos \left(z \cdot 30\right)\right) + t\_0 \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\left|\mathsf{fma}\left(\cos \left(-30 \cdot x\right), t\_0, \mathsf{fma}\left(\cos \left(-30 \cdot z\right), t\_1, \cos \left(-30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)\right)\right)\right| - 0.2, \sqrt{\mathsf{fma}\left(z \cdot z, 900, \mathsf{fma}\left(x \cdot x, 900, \left(y \cdot y\right) \cdot 900\right)\right)} - 25\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot \cos \left(30 \cdot z\right)\right)\right) + \sin \left(30 \cdot z\right)\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
Applied rewrites46.8%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(sqrt
(+
(+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
(pow (* z 30.0) 2.0)))
25.0))
(t_1 (sin (* 30.0 z)))
(t_2 (cos (* 30.0 z))))
(if (<=
(fmax
t_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))
1e+153)
(fmax t_0 (- (fabs (+ t_1 (* t_2 (sin (* 30.0 y))))) 0.2))
(fmax
(* -30.0 y)
(- (fabs (+ (fma 30.0 x (* 30.0 (* y t_2))) t_1)) 0.2)))))double code(double x, double y, double z) {
double t_0 = sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0;
double t_1 = sin((30.0 * z));
double t_2 = cos((30.0 * z));
double tmp;
if (fmax(t_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)) <= 1e+153) {
tmp = fmax(t_0, (fabs((t_1 + (t_2 * sin((30.0 * y))))) - 0.2));
} else {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * t_2))) + t_1)) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0) t_1 = sin(Float64(30.0 * z)) t_2 = cos(Float64(30.0 * z)) tmp = 0.0 if (fmax(t_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)) <= 1e+153) tmp = fmax(t_0, Float64(abs(Float64(t_1 + Float64(t_2 * sin(Float64(30.0 * y))))) - 0.2)); else tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * t_2))) + t_1)) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Max[t$95$0, 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], 1e+153], N[Max[t$95$0, N[(N[Abs[N[(t$95$1 + N[(t$95$2 * N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25\\
t_1 := \sin \left(30 \cdot z\right)\\
t_2 := \cos \left(30 \cdot z\right)\\
\mathbf{if}\;\mathsf{max}\left(t\_0, \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) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(t\_0, \left|t\_1 + t\_2 \cdot \sin \left(30 \cdot y\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot t\_2\right)\right) + t\_1\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
Taylor expanded in x around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.5
Applied rewrites46.5%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* z 30.0))) (t_1 (sin (* y 30.0))))
(if (<=
(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))) (* t_1 (cos (* z 30.0))))
(* t_0 (cos (* x 30.0)))))
0.2))
1e+153)
(fmax
(- (sqrt (* (fma z z (fma y y (* x x))) 900.0)) 25.0)
(- (fabs (fma (cos (* -30.0 z)) t_1 t_0)) 0.2))
(fmax
(* -30.0 y)
(-
(fabs (+ (fma 30.0 x (* 30.0 (* y (cos (* 30.0 z))))) (sin (* 30.0 z))))
0.2)))))double code(double x, double y, double z) {
double t_0 = sin((z * 30.0));
double t_1 = sin((y * 30.0));
double tmp;
if (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))) + (t_1 * cos((z * 30.0)))) + (t_0 * cos((x * 30.0))))) - 0.2)) <= 1e+153) {
tmp = fmax((sqrt((fma(z, z, fma(y, y, (x * x))) * 900.0)) - 25.0), (fabs(fma(cos((-30.0 * z)), t_1, t_0)) - 0.2));
} else {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * cos((30.0 * z))))) + sin((30.0 * z)))) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(z * 30.0)) t_1 = sin(Float64(y * 30.0)) tmp = 0.0 if (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(t_1 * cos(Float64(z * 30.0)))) + Float64(t_0 * cos(Float64(x * 30.0))))) - 0.2)) <= 1e+153) tmp = fmax(Float64(sqrt(Float64(fma(z, z, fma(y, y, Float64(x * x))) * 900.0)) - 25.0), Float64(abs(fma(cos(Float64(-30.0 * z)), t_1, t_0)) - 0.2)); else tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * cos(Float64(30.0 * z))))) + sin(Float64(30.0 * z)))) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[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[(t$95$1 * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 1e+153], N[Max[N[(N[Sqrt[N[(N[(z * z + N[(y * y + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Cos[N[(-30.0 * z), $MachinePrecision]], $MachinePrecision] * t$95$1 + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_0 := \sin \left(z \cdot 30\right)\\
t_1 := \sin \left(y \cdot 30\right)\\
\mathbf{if}\;\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) + t\_1 \cdot \cos \left(z \cdot 30\right)\right) + t\_0 \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z, z, \mathsf{fma}\left(y, y, x \cdot x\right)\right) \cdot 900} - 25, \left|\mathsf{fma}\left(\cos \left(-30 \cdot z\right), t\_1, t\_0\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot \cos \left(30 \cdot z\right)\right)\right) + \sin \left(30 \cdot z\right)\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
lift--.f64N/A
sub-to-multN/A
lower-unsound-*.f64N/A
Applied rewrites46.8%
Taylor expanded in x around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6443.1
Applied rewrites43.1%
Taylor expanded in x around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.5
Applied rewrites46.5%
Applied rewrites46.4%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z)
:precision binary64
(if (<=
(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))
1e+153)
(fmax
(- (* (sqrt (fma z z (fma y y (* x x)))) (sqrt 900.0)) 25.0)
(- (fabs (sin (* 30.0 y))) 0.2))
(fmax
(* -30.0 y)
(-
(fabs (+ (fma 30.0 x (* 30.0 (* y (cos (* 30.0 z))))) (sin (* 30.0 z))))
0.2))))double code(double x, double y, double z) {
double tmp;
if (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)) <= 1e+153) {
tmp = fmax(((sqrt(fma(z, z, fma(y, y, (x * x)))) * sqrt(900.0)) - 25.0), (fabs(sin((30.0 * y))) - 0.2));
} else {
tmp = fmax((-30.0 * y), (fabs((fma(30.0, x, (30.0 * (y * cos((30.0 * z))))) + sin((30.0 * z)))) - 0.2));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (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)) <= 1e+153) tmp = fmax(Float64(Float64(sqrt(fma(z, z, fma(y, y, Float64(x * x)))) * sqrt(900.0)) - 25.0), Float64(abs(sin(Float64(30.0 * y))) - 0.2)); else tmp = fmax(Float64(-30.0 * y), Float64(abs(Float64(fma(30.0, x, Float64(30.0 * Float64(y * cos(Float64(30.0 * z))))) + sin(Float64(30.0 * z)))) - 0.2)); end return tmp end
code[x_, y_, z_] := If[LessEqual[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], 1e+153], N[Max[N[(N[(N[Sqrt[N[(z * z + N[(y * y + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[900.0], $MachinePrecision]), $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[(N[(30.0 * x + N[(30.0 * N[(y * N[Cos[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\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) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z, z, \mathsf{fma}\left(y, y, x \cdot x\right)\right)} \cdot \sqrt{900} - 25, \left|\sin \left(30 \cdot y\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\mathsf{fma}\left(30, x, 30 \cdot \left(y \cdot \cos \left(30 \cdot z\right)\right)\right) + \sin \left(30 \cdot z\right)\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
lift-sqrt.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
lift-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
lift-fma.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
Applied rewrites46.6%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in y around -inf
lower-*.f6417.7
Applied rewrites17.7%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z)
:precision binary64
(if (<=
(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))
1e+153)
(fmax
(- (* (sqrt (fma z z (fma y y (* x x)))) (sqrt 900.0)) 25.0)
(- (fabs (sin (* 30.0 y))) 0.2))
(fmax (* -30.0 x) (- (fabs (* 30.0 y)) 0.2))))double code(double x, double y, double z) {
double tmp;
if (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)) <= 1e+153) {
tmp = fmax(((sqrt(fma(z, z, fma(y, y, (x * x)))) * sqrt(900.0)) - 25.0), (fabs(sin((30.0 * y))) - 0.2));
} else {
tmp = fmax((-30.0 * x), (fabs((30.0 * y)) - 0.2));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (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)) <= 1e+153) tmp = fmax(Float64(Float64(sqrt(fma(z, z, fma(y, y, Float64(x * x)))) * sqrt(900.0)) - 25.0), Float64(abs(sin(Float64(30.0 * y))) - 0.2)); else tmp = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * y)) - 0.2)); end return tmp end
code[x_, y_, z_] := If[LessEqual[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], 1e+153], N[Max[N[(N[(N[Sqrt[N[(z * z + N[(y * y + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[900.0], $MachinePrecision]), $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\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) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z, z, \mathsf{fma}\left(y, y, x \cdot x\right)\right)} \cdot \sqrt{900} - 25, \left|\sin \left(30 \cdot y\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|30 \cdot y\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
lift-sqrt.f64N/A
lift-+.f64N/A
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
lift-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
lift-fma.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
Applied rewrites46.6%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around -inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around 0
lower-*.f6443.8
Applied rewrites43.8%
(FPCore (x y z)
:precision binary64
(if (<=
(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))
1e+153)
(fmax
(- (sqrt (* (fma z z (fma y y (* x x))) 900.0)) 25.0)
(- (fabs (sin (* 30.0 y))) 0.2))
(fmax (* -30.0 x) (- (fabs (* 30.0 y)) 0.2))))double code(double x, double y, double z) {
double tmp;
if (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)) <= 1e+153) {
tmp = fmax((sqrt((fma(z, z, fma(y, y, (x * x))) * 900.0)) - 25.0), (fabs(sin((30.0 * y))) - 0.2));
} else {
tmp = fmax((-30.0 * x), (fabs((30.0 * y)) - 0.2));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (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)) <= 1e+153) tmp = fmax(Float64(sqrt(Float64(fma(z, z, fma(y, y, Float64(x * x))) * 900.0)) - 25.0), Float64(abs(sin(Float64(30.0 * y))) - 0.2)); else tmp = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * y)) - 0.2)); end return tmp end
code[x_, y_, z_] := If[LessEqual[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], 1e+153], N[Max[N[(N[Sqrt[N[(N[(z * z + N[(y * y + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\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) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z, z, \mathsf{fma}\left(y, y, x \cdot x\right)\right) \cdot 900} - 25, \left|\sin \left(30 \cdot y\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|30 \cdot y\right| - 0.2\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Applied rewrites46.1%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around -inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around 0
lower-*.f6443.8
Applied rewrites43.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (fabs (* 30.0 y)) 0.2)))
(if (<=
(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))
1e+153)
(fmax (- (sqrt (fma (fma y y (* x x)) 900.0 (* (* 900.0 z) z))) 25.0) t_0)
(fmax (* -30.0 x) t_0))))double code(double x, double y, double z) {
double t_0 = fabs((30.0 * y)) - 0.2;
double tmp;
if (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)) <= 1e+153) {
tmp = fmax((sqrt(fma(fma(y, y, (x * x)), 900.0, ((900.0 * z) * z))) - 25.0), t_0);
} else {
tmp = fmax((-30.0 * x), t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(abs(Float64(30.0 * y)) - 0.2) tmp = 0.0 if (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)) <= 1e+153) tmp = fmax(Float64(sqrt(fma(fma(y, y, Float64(x * x)), 900.0, Float64(Float64(900.0 * z) * z))) - 25.0), t_0); else tmp = fmax(Float64(-30.0 * x), t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[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], 1e+153], N[Max[N[(N[Sqrt[N[(N[(y * y + N[(x * x), $MachinePrecision]), $MachinePrecision] * 900.0 + N[(N[(900.0 * z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$0], $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|30 \cdot y\right| - 0.2\\
\mathbf{if}\;\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) \leq 10^{+153}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(y, y, x \cdot x\right), 900, \left(900 \cdot z\right) \cdot z\right)} - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_0\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 1e153Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
lift-+.f64N/A
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
lift-*.f64N/A
metadata-evalN/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
swap-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6446.2
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
Applied rewrites46.1%
Taylor expanded in y around 0
lower-*.f6445.8
Applied rewrites45.8%
if 1e153 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around -inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around 0
lower-*.f6443.8
Applied rewrites43.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (fabs (* 30.0 y)) 0.2)))
(if (<=
(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))
-0.1)
(fmax (* -1.0 (* y (+ 30.0 (* 25.0 (/ 1.0 y))))) t_0)
(fmax (* -30.0 x) t_0))))double code(double x, double y, double z) {
double t_0 = fabs((30.0 * y)) - 0.2;
double tmp;
if (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)) <= -0.1) {
tmp = fmax((-1.0 * (y * (30.0 + (25.0 * (1.0 / y))))), t_0);
} else {
tmp = fmax((-30.0 * x), t_0);
}
return tmp;
}
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
real(8) :: t_0
real(8) :: tmp
t_0 = abs((30.0d0 * y)) - 0.2d0
if (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)) <= (-0.1d0)) then
tmp = fmax(((-1.0d0) * (y * (30.0d0 + (25.0d0 * (1.0d0 / y))))), t_0)
else
tmp = fmax(((-30.0d0) * x), t_0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.abs((30.0 * y)) - 0.2;
double tmp;
if (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)) <= -0.1) {
tmp = fmax((-1.0 * (y * (30.0 + (25.0 * (1.0 / y))))), t_0);
} else {
tmp = fmax((-30.0 * x), t_0);
}
return tmp;
}
def code(x, y, z): t_0 = math.fabs((30.0 * y)) - 0.2 tmp = 0 if 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)) <= -0.1: tmp = fmax((-1.0 * (y * (30.0 + (25.0 * (1.0 / y))))), t_0) else: tmp = fmax((-30.0 * x), t_0) return tmp
function code(x, y, z) t_0 = Float64(abs(Float64(30.0 * y)) - 0.2) tmp = 0.0 if (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)) <= -0.1) tmp = fmax(Float64(-1.0 * Float64(y * Float64(30.0 + Float64(25.0 * Float64(1.0 / y))))), t_0); else tmp = fmax(Float64(-30.0 * x), t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = abs((30.0 * y)) - 0.2; tmp = 0.0; if (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)) <= -0.1) tmp = max((-1.0 * (y * (30.0 + (25.0 * (1.0 / y))))), t_0); else tmp = max((-30.0 * x), t_0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[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], -0.1], N[Max[N[(-1.0 * N[(y * N[(30.0 + N[(25.0 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$0], $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|30 \cdot y\right| - 0.2\\
\mathbf{if}\;\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) \leq -0.1:\\
\;\;\;\;\mathsf{max}\left(-1 \cdot \left(y \cdot \left(30 + 25 \cdot \frac{1}{y}\right)\right), t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_0\right)\\
\end{array}
if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < -0.10000000000000001Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f6427.3
Applied rewrites27.3%
Taylor expanded in y around 0
lower-*.f6441.0
Applied rewrites41.0%
if -0.10000000000000001 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around -inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around 0
lower-*.f6443.8
Applied rewrites43.8%
(FPCore (x y z) :precision binary64 (fmax (* -30.0 x) (- (fabs (* 30.0 y)) 0.2)))
double code(double x, double y, double z) {
return fmax((-30.0 * x), (fabs((30.0 * y)) - 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(((-30.0d0) * x), (abs((30.0d0 * y)) - 0.2d0))
end function
public static double code(double x, double y, double z) {
return fmax((-30.0 * x), (Math.abs((30.0 * y)) - 0.2));
}
def code(x, y, z): return fmax((-30.0 * x), (math.fabs((30.0 * y)) - 0.2))
function code(x, y, z) return fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * y)) - 0.2)) end
function tmp = code(x, y, z) tmp = max((-30.0 * x), (abs((30.0 * y)) - 0.2)); end
code[x_, y_, z_] := N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\mathsf{max}\left(-30 \cdot x, \left|30 \cdot y\right| - 0.2\right)
Initial program 46.9%
Taylor expanded in z around 0
lower-+.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around 0
lower-sin.f64N/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around -inf
lower-*.f6417.1
Applied rewrites17.1%
Taylor expanded in y around 0
lower-*.f6443.8
Applied rewrites43.8%
herbie shell --seed 2025180
(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)))