
(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}
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]
\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 (sin (* z 30.0)))
(t_1 (- (fabs (fma t_0 (cos (* 30.0 x)) (sin (* 30.0 x)))) 0.2)))
(if (<= y -1.35e+77)
(fmax (- (hypot (* y 30.0) (* 30.0 x)) 25.0) t_1)
(if (<= y 1.2e+18)
(fmax
(- (hypot (* z 30.0) (* 30.0 x)) 25.0)
(-
(fabs
(+
(+
(* (sin (* x 30.0)) (cos (* y 30.0)))
(* (sin (* y 30.0)) (cos (* z 30.0))))
(* t_0 (cos (* x 30.0)))))
0.2))
(fmax (- (hypot (* z 30.0) (* y 30.0)) 25.0) t_1)))))
double code(double x, double y, double z) {
double t_0 = sin((z * 30.0));
double t_1 = fabs(fma(t_0, cos((30.0 * x)), sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -1.35e+77) {
tmp = fmax((hypot((y * 30.0), (30.0 * x)) - 25.0), t_1);
} else if (y <= 1.2e+18) {
tmp = fmax((hypot((z * 30.0), (30.0 * x)) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (t_0 * cos((x * 30.0))))) - 0.2));
} else {
tmp = fmax((hypot((z * 30.0), (y * 30.0)) - 25.0), t_1);
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(z * 30.0)) t_1 = Float64(abs(fma(t_0, cos(Float64(30.0 * x)), sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -1.35e+77) tmp = fmax(Float64(hypot(Float64(y * 30.0), Float64(30.0 * x)) - 25.0), t_1); elseif (y <= 1.2e+18) tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(30.0 * x)) - 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(t_0 * cos(Float64(x * 30.0))))) - 0.2)); else tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(y * 30.0)) - 25.0), t_1); 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[(N[Abs[N[(t$95$0 * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -1.35e+77], N[Max[N[(N[Sqrt[N[(y * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[y, 1.2e+18], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $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[(t$95$0 * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(y * 30.0), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(z \cdot 30\right)\\
t_1 := \left|\mathsf{fma}\left(t\_0, \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, t\_1\right)\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 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) + t\_0 \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, y \cdot 30\right) - 25, t\_1\right)\\
\end{array}
\end{array}
if y < -1.3499999999999999e77Initial program 26.1%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6484.1
Applied rewrites84.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6484.1
Applied rewrites84.1%
if -1.3499999999999999e77 < y < 1.2e18Initial program 59.3%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6495.9
Applied rewrites95.9%
if 1.2e18 < y Initial program 30.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* z 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)))
(* (sin (* y 30.0)) (cos (* z 30.0))))
(* t_0 (cos (* x 30.0)))))
0.2))
-0.1)
(fmax (- (sqrt (* (* x x) 900.0)) 25.0) (- (fabs (* 30.0 x)) 0.2))
(fmax (* -30.0 x) (- (fabs (fma 30.0 x t_0)) 0.2)))))
double code(double x, double y, double z) {
double t_0 = sin((z * 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))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (t_0 * cos((x * 30.0))))) - 0.2)) <= -0.1) {
tmp = fmax((sqrt(((x * x) * 900.0)) - 25.0), (fabs((30.0 * x)) - 0.2));
} else {
tmp = fmax((-30.0 * x), (fabs(fma(30.0, x, t_0)) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(z * 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(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))) + Float64(t_0 * cos(Float64(x * 30.0))))) - 0.2)) <= -0.1) tmp = fmax(Float64(sqrt(Float64(Float64(x * x) * 900.0)) - 25.0), Float64(abs(Float64(30.0 * x)) - 0.2)); else tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(30.0, x, t_0)) - 0.2)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(z * 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[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * 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], -0.1], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(z \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) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + t\_0 \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq -0.1:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\left(x \cdot x\right) \cdot 900} - 25, \left|30 \cdot x\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30, x, t\_0\right)\right| - 0.2\right)\\
\end{array}
\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 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6499.9
Applied rewrites99.9%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6497.8
Applied rewrites97.8%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6495.6
Applied rewrites95.6%
Taylor expanded in x around 0
lift-*.f6495.3
Applied rewrites95.3%
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 39.0%
Taylor expanded in x around -inf
lower-*.f6420.4
Applied rewrites20.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6419.9
Applied rewrites19.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6435.7
Applied rewrites35.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (fabs (* 30.0 x)) 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 (- (sqrt (* (* x x) 900.0)) 25.0) t_0)
(fmax (* -30.0 x) t_0))))
double code(double x, double y, double z) {
double t_0 = fabs((30.0 * x)) - 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((sqrt(((x * x) * 900.0)) - 25.0), 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 * x)) - 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((sqrt(((x * x) * 900.0d0)) - 25.0d0), 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 * x)) - 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((Math.sqrt(((x * x) * 900.0)) - 25.0), t_0);
} else {
tmp = fmax((-30.0 * x), t_0);
}
return tmp;
}
def code(x, y, z): t_0 = math.fabs((30.0 * x)) - 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((math.sqrt(((x * x) * 900.0)) - 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 * x)) - 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(sqrt(Float64(Float64(x * x) * 900.0)) - 25.0), 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 * x)) - 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((sqrt(((x * x) * 900.0)) - 25.0), 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 * x), $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[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|30 \cdot x\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(\sqrt{\left(x \cdot x\right) \cdot 900} - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_0\right)\\
\end{array}
\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 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6499.9
Applied rewrites99.9%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6497.8
Applied rewrites97.8%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6495.6
Applied rewrites95.6%
Taylor expanded in x around 0
lift-*.f6495.3
Applied rewrites95.3%
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 39.0%
Taylor expanded in x around -inf
lower-*.f6420.4
Applied rewrites20.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6419.9
Applied rewrites19.9%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6419.2
Applied rewrites19.2%
Taylor expanded in x around 0
lift-*.f6435.1
Applied rewrites35.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(fabs (fma (sin (* z 30.0)) (cos (* 30.0 x)) (sin (* 30.0 x))))
0.2)))
(if (<= y -4.1e+33)
(fmax (- (hypot (* y 30.0) (* 30.0 x)) 25.0) t_0)
(if (<= y 1.2e+18)
(fmax (- (hypot (* z 30.0) (* 30.0 x)) 25.0) t_0)
(fmax (- (hypot (* z 30.0) (* y 30.0)) 25.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = fabs(fma(sin((z * 30.0)), cos((30.0 * x)), sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -4.1e+33) {
tmp = fmax((hypot((y * 30.0), (30.0 * x)) - 25.0), t_0);
} else if (y <= 1.2e+18) {
tmp = fmax((hypot((z * 30.0), (30.0 * x)) - 25.0), t_0);
} else {
tmp = fmax((hypot((z * 30.0), (y * 30.0)) - 25.0), t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(abs(fma(sin(Float64(z * 30.0)), cos(Float64(30.0 * x)), sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -4.1e+33) tmp = fmax(Float64(hypot(Float64(y * 30.0), Float64(30.0 * x)) - 25.0), t_0); elseif (y <= 1.2e+18) tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(30.0 * x)) - 25.0), t_0); else tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(y * 30.0)) - 25.0), t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -4.1e+33], N[Max[N[(N[Sqrt[N[(y * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], If[LessEqual[y, 1.2e+18], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(y * 30.0), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, t\_0\right)\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, y \cdot 30\right) - 25, t\_0\right)\\
\end{array}
\end{array}
if y < -4.09999999999999995e33Initial program 31.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6482.0
Applied rewrites82.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6482.0
Applied rewrites82.0%
if -4.09999999999999995e33 < y < 1.2e18Initial program 59.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6463.8
Applied rewrites63.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6463.1
Applied rewrites63.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
*-commutativeN/A
lower-hypot.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6496.9
Applied rewrites96.9%
if 1.2e18 < y Initial program 30.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* z 30.0)))
(t_1 (- (fabs (fma t_0 (cos (* 30.0 x)) (sin (* 30.0 x)))) 0.2)))
(if (<= y -4.1e+33)
(fmax (- (hypot (* y 30.0) (* 30.0 x)) 25.0) t_1)
(if (<= y 1.2e+18)
(fmax (- (hypot (* z 30.0) (* 30.0 x)) 25.0) t_1)
(fmax (- (hypot (* z 30.0) (* y 30.0)) 25.0) (- (fabs t_0) 0.2))))))
double code(double x, double y, double z) {
double t_0 = sin((z * 30.0));
double t_1 = fabs(fma(t_0, cos((30.0 * x)), sin((30.0 * x)))) - 0.2;
double tmp;
if (y <= -4.1e+33) {
tmp = fmax((hypot((y * 30.0), (30.0 * x)) - 25.0), t_1);
} else if (y <= 1.2e+18) {
tmp = fmax((hypot((z * 30.0), (30.0 * x)) - 25.0), t_1);
} else {
tmp = fmax((hypot((z * 30.0), (y * 30.0)) - 25.0), (fabs(t_0) - 0.2));
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(z * 30.0)) t_1 = Float64(abs(fma(t_0, cos(Float64(30.0 * x)), sin(Float64(30.0 * x)))) - 0.2) tmp = 0.0 if (y <= -4.1e+33) tmp = fmax(Float64(hypot(Float64(y * 30.0), Float64(30.0 * x)) - 25.0), t_1); elseif (y <= 1.2e+18) tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(30.0 * x)) - 25.0), t_1); else tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(y * 30.0)) - 25.0), Float64(abs(t_0) - 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[(N[Abs[N[(t$95$0 * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[y, -4.1e+33], N[Max[N[(N[Sqrt[N[(y * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[y, 1.2e+18], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(y * 30.0), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[t$95$0], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(z \cdot 30\right)\\
t_1 := \left|\mathsf{fma}\left(t\_0, \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, t\_1\right)\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, y \cdot 30\right) - 25, \left|t\_0\right| - 0.2\right)\\
\end{array}
\end{array}
if y < -4.09999999999999995e33Initial program 31.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6482.0
Applied rewrites82.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6482.0
Applied rewrites82.0%
if -4.09999999999999995e33 < y < 1.2e18Initial program 59.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6463.8
Applied rewrites63.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6463.1
Applied rewrites63.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
*-commutativeN/A
lower-hypot.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6496.9
Applied rewrites96.9%
if 1.2e18 < y Initial program 30.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
Taylor expanded in x around 0
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6481.1
Applied rewrites81.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sin (* z 30.0)))
(t_1 (fmax (- (hypot (* z 30.0) (* y 30.0)) 25.0) (- (fabs t_0) 0.2))))
(if (<= z -1.9e+52)
t_1
(if (<= z 7.5e+31)
(fmax
(- (hypot (* y 30.0) (* 30.0 x)) 25.0)
(- (fabs (fma t_0 (cos (* 30.0 x)) (sin (* 30.0 x)))) 0.2))
t_1))))
double code(double x, double y, double z) {
double t_0 = sin((z * 30.0));
double t_1 = fmax((hypot((z * 30.0), (y * 30.0)) - 25.0), (fabs(t_0) - 0.2));
double tmp;
if (z <= -1.9e+52) {
tmp = t_1;
} else if (z <= 7.5e+31) {
tmp = fmax((hypot((y * 30.0), (30.0 * x)) - 25.0), (fabs(fma(t_0, cos((30.0 * x)), sin((30.0 * x)))) - 0.2));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z) t_0 = sin(Float64(z * 30.0)) t_1 = fmax(Float64(hypot(Float64(z * 30.0), Float64(y * 30.0)) - 25.0), Float64(abs(t_0) - 0.2)) tmp = 0.0 if (z <= -1.9e+52) tmp = t_1; elseif (z <= 7.5e+31) tmp = fmax(Float64(hypot(Float64(y * 30.0), Float64(30.0 * x)) - 25.0), Float64(abs(fma(t_0, cos(Float64(30.0 * x)), sin(Float64(30.0 * x)))) - 0.2)); else tmp = t_1; 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[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(y * 30.0), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[t$95$0], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.9e+52], t$95$1, If[LessEqual[z, 7.5e+31], N[Max[N[(N[Sqrt[N[(y * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(t$95$0 * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(z \cdot 30\right)\\
t_1 := \mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, y \cdot 30\right) - 25, \left|t\_0\right| - 0.2\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\mathsf{fma}\left(t\_0, \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9e52 or 7.5e31 < z Initial program 29.1%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6481.4
Applied rewrites81.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6481.4
Applied rewrites81.4%
Taylor expanded in x around 0
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6481.4
Applied rewrites81.4%
if -1.9e52 < z < 7.5e31Initial program 59.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6496.5
Applied rewrites96.5%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6495.8
Applied rewrites95.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2))))
(if (<= x -2.6e+95)
t_0
(if (<= x 9.5e+29)
(fmax
(- (hypot (* z 30.0) (* y 30.0)) 25.0)
(- (fabs (sin (* z 30.0))) 0.2))
(if (<= x 1.7e+146)
(fmax
(- (sqrt (* (* x x) 900.0)) 25.0)
(- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2))
t_0)))))
double code(double x, double y, double z) {
double t_0 = fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
double tmp;
if (x <= -2.6e+95) {
tmp = t_0;
} else if (x <= 9.5e+29) {
tmp = fmax((hypot((z * 30.0), (y * 30.0)) - 25.0), (fabs(sin((z * 30.0))) - 0.2));
} else if (x <= 1.7e+146) {
tmp = fmax((sqrt(((x * x) * 900.0)) - 25.0), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2)) tmp = 0.0 if (x <= -2.6e+95) tmp = t_0; elseif (x <= 9.5e+29) tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(y * 30.0)) - 25.0), Float64(abs(sin(Float64(z * 30.0))) - 0.2)); elseif (x <= 1.7e+146) tmp = fmax(Float64(sqrt(Float64(Float64(x * x) * 900.0)) - 25.0), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2)); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -2.6e+95], t$95$0, If[LessEqual[x, 9.5e+29], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(y * 30.0), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.7e+146], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+95}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, y \cdot 30\right) - 25, \left|\sin \left(z \cdot 30\right)\right| - 0.2\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+146}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\left(x \cdot x\right) \cdot 900} - 25, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.5999999999999999e95 or 1.69999999999999995e146 < x Initial program 16.6%
Taylor expanded in x around -inf
lower-*.f6442.1
Applied rewrites42.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6442.1
Applied rewrites42.1%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6442.1
Applied rewrites42.1%
Taylor expanded in x around 0
lift-*.f6473.6
Applied rewrites73.6%
if -2.5999999999999999e95 < x < 9.5000000000000003e29Initial program 59.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
*-commutativeN/A
metadata-evalN/A
unpow-prod-downN/A
unpow2N/A
lower-hypot.f64N/A
lift-*.f64N/A
lift-*.f6494.8
Applied rewrites94.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6494.1
Applied rewrites94.1%
Taylor expanded in x around 0
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6493.3
Applied rewrites93.3%
if 9.5000000000000003e29 < x < 1.69999999999999995e146Initial program 56.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6442.7
Applied rewrites42.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6442.7
Applied rewrites42.7%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-sin.f64N/A
lift-*.f6469.4
Applied rewrites69.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2)))
(t_1 (- (fabs (sin (* 30.0 x))) 0.2)))
(if (<= x -1.96e+152)
t_0
(if (<= x -5.7e+19)
(fmax (- (sqrt (* 900.0 (fma x x (* z z)))) 25.0) t_1)
(if (<= x 2e+74)
(fmax (- (sqrt (* 900.0 (fma y y (* z z)))) 25.0) t_1)
t_0)))))
double code(double x, double y, double z) {
double t_0 = fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
double t_1 = fabs(sin((30.0 * x))) - 0.2;
double tmp;
if (x <= -1.96e+152) {
tmp = t_0;
} else if (x <= -5.7e+19) {
tmp = fmax((sqrt((900.0 * fma(x, x, (z * z)))) - 25.0), t_1);
} else if (x <= 2e+74) {
tmp = fmax((sqrt((900.0 * fma(y, y, (z * z)))) - 25.0), t_1);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2)) t_1 = Float64(abs(sin(Float64(30.0 * x))) - 0.2) tmp = 0.0 if (x <= -1.96e+152) tmp = t_0; elseif (x <= -5.7e+19) tmp = fmax(Float64(sqrt(Float64(900.0 * fma(x, x, Float64(z * z)))) - 25.0), t_1); elseif (x <= 2e+74) tmp = fmax(Float64(sqrt(Float64(900.0 * fma(y, y, Float64(z * z)))) - 25.0), t_1); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -1.96e+152], t$95$0, If[LessEqual[x, -5.7e+19], N[Max[N[(N[Sqrt[N[(900.0 * N[(x * x + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[x, 2e+74], N[Max[N[(N[Sqrt[N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\
t_1 := \left|\sin \left(30 \cdot x\right)\right| - 0.2\\
\mathbf{if}\;x \leq -1.96 \cdot 10^{+152}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -5.7 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{900 \cdot \mathsf{fma}\left(x, x, z \cdot z\right)} - 25, t\_1\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)} - 25, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.96e152 or 1.9999999999999999e74 < x Initial program 19.0%
Taylor expanded in x around -inf
lower-*.f6433.6
Applied rewrites33.6%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6433.6
Applied rewrites33.6%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6433.5
Applied rewrites33.5%
Taylor expanded in x around 0
lift-*.f6471.0
Applied rewrites71.0%
if -1.96e152 < x < -5.7e19Initial program 59.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6443.5
Applied rewrites43.5%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6443.5
Applied rewrites43.5%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6443.5
Applied rewrites43.5%
Taylor expanded in y around 0
rem-square-sqrtN/A
distribute-lft-outN/A
lower-*.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6451.8
Applied rewrites51.8%
if -5.7e19 < x < 1.9999999999999999e74Initial program 59.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6428.8
Applied rewrites28.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6427.4
Applied rewrites27.4%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6425.4
Applied rewrites25.4%
Taylor expanded in x around 0
rem-square-sqrtN/A
distribute-lft-outN/A
lower-*.f64N/A
unpow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6454.1
Applied rewrites54.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2)))
(t_1 (- (fabs (sin (* 30.0 x))) 0.2)))
(if (<= x -1.96e+152)
t_0
(if (<= x -1.2e-19)
(fmax (- (sqrt (* 900.0 (fma x x (* z z)))) 25.0) t_1)
(if (<= x 4.8e+26) (fmax (- (sqrt (* (* y y) 900.0)) 25.0) t_1) t_0)))))
double code(double x, double y, double z) {
double t_0 = fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
double t_1 = fabs(sin((30.0 * x))) - 0.2;
double tmp;
if (x <= -1.96e+152) {
tmp = t_0;
} else if (x <= -1.2e-19) {
tmp = fmax((sqrt((900.0 * fma(x, x, (z * z)))) - 25.0), t_1);
} else if (x <= 4.8e+26) {
tmp = fmax((sqrt(((y * y) * 900.0)) - 25.0), t_1);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2)) t_1 = Float64(abs(sin(Float64(30.0 * x))) - 0.2) tmp = 0.0 if (x <= -1.96e+152) tmp = t_0; elseif (x <= -1.2e-19) tmp = fmax(Float64(sqrt(Float64(900.0 * fma(x, x, Float64(z * z)))) - 25.0), t_1); elseif (x <= 4.8e+26) tmp = fmax(Float64(sqrt(Float64(Float64(y * y) * 900.0)) - 25.0), t_1); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[x, -1.96e+152], t$95$0, If[LessEqual[x, -1.2e-19], N[Max[N[(N[Sqrt[N[(900.0 * N[(x * x + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], If[LessEqual[x, 4.8e+26], N[Max[N[(N[Sqrt[N[(N[(y * y), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], t$95$1], $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\
t_1 := \left|\sin \left(30 \cdot x\right)\right| - 0.2\\
\mathbf{if}\;x \leq -1.96 \cdot 10^{+152}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{900 \cdot \mathsf{fma}\left(x, x, z \cdot z\right)} - 25, t\_1\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.96e152 or 4.80000000000000009e26 < x Initial program 23.4%
Taylor expanded in x around -inf
lower-*.f6430.4
Applied rewrites30.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6430.4
Applied rewrites30.4%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6430.3
Applied rewrites30.3%
Taylor expanded in x around 0
lift-*.f6467.3
Applied rewrites67.3%
if -1.96e152 < x < -1.20000000000000011e-19Initial program 60.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6440.2
Applied rewrites40.2%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around 0
rem-square-sqrtN/A
distribute-lft-outN/A
lower-*.f64N/A
pow2N/A
lower-fma.f64N/A
pow2N/A
lift-*.f6451.6
Applied rewrites51.6%
if -1.20000000000000011e-19 < x < 4.80000000000000009e26Initial program 59.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6428.0
Applied rewrites28.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6426.5
Applied rewrites26.5%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6424.1
Applied rewrites24.1%
Taylor expanded in y around inf
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.0
Applied rewrites41.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2))))
(if (<= x -4.4e+152)
t_0
(if (<= x 1.7e+146)
(fmax
(- (sqrt (* (* x x) 900.0)) 25.0)
(- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2))
t_0))))
double code(double x, double y, double z) {
double t_0 = fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
double tmp;
if (x <= -4.4e+152) {
tmp = t_0;
} else if (x <= 1.7e+146) {
tmp = fmax((sqrt(((x * x) * 900.0)) - 25.0), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2)) tmp = 0.0 if (x <= -4.4e+152) tmp = t_0; elseif (x <= 1.7e+146) tmp = fmax(Float64(sqrt(Float64(Float64(x * x) * 900.0)) - 25.0), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2)); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -4.4e+152], t$95$0, If[LessEqual[x, 1.7e+146], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{+152}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+146}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\left(x \cdot x\right) \cdot 900} - 25, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.3999999999999996e152 or 1.69999999999999995e146 < x Initial program 10.2%
Taylor expanded in x around -inf
lower-*.f6440.9
Applied rewrites40.9%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6440.9
Applied rewrites40.9%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6440.9
Applied rewrites40.9%
Taylor expanded in x around 0
lift-*.f6477.3
Applied rewrites77.3%
if -4.3999999999999996e152 < x < 1.69999999999999995e146Initial program 59.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6432.3
Applied rewrites32.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6431.2
Applied rewrites31.2%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-sin.f64N/A
lift-*.f6464.2
Applied rewrites64.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2))))
(if (<= x -5.7e+19)
t_0
(if (<= x 4.8e+26)
(fmax (- (sqrt (* (* y y) 900.0)) 25.0) (- (fabs (sin (* 30.0 x))) 0.2))
t_0))))
double code(double x, double y, double z) {
double t_0 = fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
double tmp;
if (x <= -5.7e+19) {
tmp = t_0;
} else if (x <= 4.8e+26) {
tmp = fmax((sqrt(((y * y) * 900.0)) - 25.0), (fabs(sin((30.0 * x))) - 0.2));
} else {
tmp = 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 = fmax(((-30.0d0) * x), (abs((30.0d0 * x)) - 0.2d0))
if (x <= (-5.7d+19)) then
tmp = t_0
else if (x <= 4.8d+26) then
tmp = fmax((sqrt(((y * y) * 900.0d0)) - 25.0d0), (abs(sin((30.0d0 * x))) - 0.2d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = fmax((-30.0 * x), (Math.abs((30.0 * x)) - 0.2));
double tmp;
if (x <= -5.7e+19) {
tmp = t_0;
} else if (x <= 4.8e+26) {
tmp = fmax((Math.sqrt(((y * y) * 900.0)) - 25.0), (Math.abs(Math.sin((30.0 * x))) - 0.2));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = fmax((-30.0 * x), (math.fabs((30.0 * x)) - 0.2)) tmp = 0 if x <= -5.7e+19: tmp = t_0 elif x <= 4.8e+26: tmp = fmax((math.sqrt(((y * y) * 900.0)) - 25.0), (math.fabs(math.sin((30.0 * x))) - 0.2)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2)) tmp = 0.0 if (x <= -5.7e+19) tmp = t_0; elseif (x <= 4.8e+26) tmp = fmax(Float64(sqrt(Float64(Float64(y * y) * 900.0)) - 25.0), Float64(abs(sin(Float64(30.0 * x))) - 0.2)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = max((-30.0 * x), (abs((30.0 * x)) - 0.2)); tmp = 0.0; if (x <= -5.7e+19) tmp = t_0; elseif (x <= 4.8e+26) tmp = max((sqrt(((y * y) * 900.0)) - 25.0), (abs(sin((30.0 * x))) - 0.2)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -5.7e+19], t$95$0, If[LessEqual[x, 4.8e+26], N[Max[N[(N[Sqrt[N[(N[(y * y), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\
\mathbf{if}\;x \leq -5.7 \cdot 10^{+19}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|\sin \left(30 \cdot x\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5.7e19 or 4.80000000000000009e26 < x Initial program 31.0%
Taylor expanded in x around -inf
lower-*.f6433.2
Applied rewrites33.2%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6433.1
Applied rewrites33.1%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6433.1
Applied rewrites33.1%
Taylor expanded in x around 0
lift-*.f6462.4
Applied rewrites62.4%
if -5.7e19 < x < 4.80000000000000009e26Initial program 59.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6428.2
Applied rewrites28.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-sin.f64N/A
lift-*.f6424.4
Applied rewrites24.4%
Taylor expanded in y around inf
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6440.2
Applied rewrites40.2%
(FPCore (x y z) :precision binary64 (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2)))
double code(double x, double y, double z) {
return fmax((-30.0 * x), (fabs((30.0 * x)) - 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 * x)) - 0.2d0))
end function
public static double code(double x, double y, double z) {
return fmax((-30.0 * x), (Math.abs((30.0 * x)) - 0.2));
}
def code(x, y, z): return fmax((-30.0 * x), (math.fabs((30.0 * x)) - 0.2))
function code(x, y, z) return fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2)) end
function tmp = code(x, y, z) tmp = max((-30.0 * x), (abs((30.0 * x)) - 0.2)); end
code[x_, y_, z_] := N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)
\end{array}
Initial program 46.2%
Taylor expanded in x around -inf
lower-*.f6418.4
Applied rewrites18.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lower-cos.f64N/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f6418.0
Applied rewrites18.0%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6417.4
Applied rewrites17.4%
Taylor expanded in x around 0
lift-*.f6431.3
Applied rewrites31.3%
herbie shell --seed 2025105
(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)))