
(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 6 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
(if (<= z -4.6e+36)
(fmax (fma -30.0 z -25.0) (- (fabs (sin (* y 30.0))) 0.2))
(if (<= z 6e+14)
(fmax (fma (hypot y x) 30.0 -25.0) (- (fabs (sin (* 30.0 x))) 0.2))
(fmax (* z 30.0) (- (fabs (* 30.0 x)) 0.2)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.6e+36) {
tmp = fmax(fma(-30.0, z, -25.0), (fabs(sin((y * 30.0))) - 0.2));
} else if (z <= 6e+14) {
tmp = fmax(fma(hypot(y, x), 30.0, -25.0), (fabs(sin((30.0 * x))) - 0.2));
} else {
tmp = fmax((z * 30.0), (fabs((30.0 * x)) - 0.2));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -4.6e+36) tmp = fmax(fma(-30.0, z, -25.0), Float64(abs(sin(Float64(y * 30.0))) - 0.2)); elseif (z <= 6e+14) tmp = fmax(fma(hypot(y, x), 30.0, -25.0), Float64(abs(sin(Float64(30.0 * x))) - 0.2)); else tmp = fmax(Float64(z * 30.0), Float64(abs(Float64(30.0 * x)) - 0.2)); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -4.6e+36], N[Max[N[(-30.0 * z + -25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 6e+14], N[Max[N[(N[Sqrt[y ^ 2 + x ^ 2], $MachinePrecision] * 30.0 + -25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(z * 30.0), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(-30, z, -25\right), \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(\mathsf{hypot}\left(y, x\right), 30, -25\right), \left|\sin \left(30 \cdot x\right)\right| - 0.2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(z \cdot 30, \left|30 \cdot x\right| - 0.2\right)\\
\end{array}
\end{array}
if z < -4.59999999999999993e36Initial program 31.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6431.4
Applied rewrites31.4%
Taylor expanded in z around 0
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6431.4
Applied rewrites31.4%
Taylor expanded in z around -inf
distribute-rgt-inN/A
*-commutativeN/A
distribute-lft-inN/A
associate-*l*N/A
lft-mult-inverseN/A
lft-mult-inverseN/A
associate-*l*N/A
associate-*l*N/A
lft-mult-inverseN/A
metadata-evalN/A
metadata-evalN/A
mul-1-negN/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f6464.1
Applied rewrites64.1%
if -4.59999999999999993e36 < z < 6e14Initial program 60.9%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6459.5
Applied rewrites59.5%
Taylor expanded in z around 0
metadata-evalN/A
fp-cancel-sub-sign-invN/A
distribute-lft-outN/A
*-commutativeN/A
+-commutativeN/A
pow2N/A
pow2N/A
sqrt-prodN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lift-fma.f64N/A
lift-*.f6457.9
Applied rewrites57.9%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lower-hypot.f6496.6
Applied rewrites96.6%
if 6e14 < z Initial program 32.5%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6432.5
Applied rewrites32.5%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6432.5
Applied rewrites32.5%
Taylor expanded in z around inf
*-commutativeN/A
lift-*.f6459.5
Applied rewrites59.5%
Taylor expanded in x around 0
lift-*.f6479.3
Applied rewrites79.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (fabs (* 30.0 x)) 0.2)))
(if (<= z -4.1e+35)
(fmax (fma -30.0 z -25.0) (- (fabs (sin (* y 30.0))) 0.2))
(if (<= z 0.00145)
(fmax (- (* y 30.0) 25.0) t_0)
(fmax (* z 30.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = fabs((30.0 * x)) - 0.2;
double tmp;
if (z <= -4.1e+35) {
tmp = fmax(fma(-30.0, z, -25.0), (fabs(sin((y * 30.0))) - 0.2));
} else if (z <= 0.00145) {
tmp = fmax(((y * 30.0) - 25.0), t_0);
} else {
tmp = fmax((z * 30.0), t_0);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(abs(Float64(30.0 * x)) - 0.2) tmp = 0.0 if (z <= -4.1e+35) tmp = fmax(fma(-30.0, z, -25.0), Float64(abs(sin(Float64(y * 30.0))) - 0.2)); elseif (z <= 0.00145) tmp = fmax(Float64(Float64(y * 30.0) - 25.0), t_0); else tmp = fmax(Float64(z * 30.0), t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[z, -4.1e+35], N[Max[N[(-30.0 * z + -25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 0.00145], N[Max[N[(N[(y * 30.0), $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(z * 30.0), $MachinePrecision], t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|30 \cdot x\right| - 0.2\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{fma}\left(-30, z, -25\right), \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\
\mathbf{elif}\;z \leq 0.00145:\\
\;\;\;\;\mathsf{max}\left(y \cdot 30 - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(z \cdot 30, t\_0\right)\\
\end{array}
\end{array}
if z < -4.0999999999999998e35Initial program 31.5%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6431.5
Applied rewrites31.5%
Taylor expanded in z around 0
*-commutativeN/A
lift-sin.f64N/A
lift-*.f6431.5
Applied rewrites31.5%
Taylor expanded in z around -inf
distribute-rgt-inN/A
*-commutativeN/A
distribute-lft-inN/A
associate-*l*N/A
lft-mult-inverseN/A
lft-mult-inverseN/A
associate-*l*N/A
associate-*l*N/A
lft-mult-inverseN/A
metadata-evalN/A
metadata-evalN/A
mul-1-negN/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f6464.0
Applied rewrites64.0%
if -4.0999999999999998e35 < z < 0.00145Initial program 61.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6459.7
Applied rewrites59.7%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in x around 0
lift-*.f6477.8
Applied rewrites77.8%
if 0.00145 < z Initial program 33.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6433.8
Applied rewrites33.8%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6433.5
Applied rewrites33.5%
Taylor expanded in z around inf
*-commutativeN/A
lift-*.f6457.1
Applied rewrites57.1%
Taylor expanded in x around 0
lift-*.f6477.7
Applied rewrites77.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (fabs (* 30.0 x)) 0.2)))
(if (<= z -4.1e+35)
(fmax (* -30.0 z) (- (fabs (sin (* 30.0 x))) 0.2))
(if (<= z 0.00145)
(fmax (- (* y 30.0) 25.0) t_0)
(fmax (* z 30.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = fabs((30.0 * x)) - 0.2;
double tmp;
if (z <= -4.1e+35) {
tmp = fmax((-30.0 * z), (fabs(sin((30.0 * x))) - 0.2));
} else if (z <= 0.00145) {
tmp = fmax(((y * 30.0) - 25.0), t_0);
} else {
tmp = fmax((z * 30.0), 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 (z <= (-4.1d+35)) then
tmp = fmax(((-30.0d0) * z), (abs(sin((30.0d0 * x))) - 0.2d0))
else if (z <= 0.00145d0) then
tmp = fmax(((y * 30.0d0) - 25.0d0), t_0)
else
tmp = fmax((z * 30.0d0), 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 (z <= -4.1e+35) {
tmp = fmax((-30.0 * z), (Math.abs(Math.sin((30.0 * x))) - 0.2));
} else if (z <= 0.00145) {
tmp = fmax(((y * 30.0) - 25.0), t_0);
} else {
tmp = fmax((z * 30.0), t_0);
}
return tmp;
}
def code(x, y, z): t_0 = math.fabs((30.0 * x)) - 0.2 tmp = 0 if z <= -4.1e+35: tmp = fmax((-30.0 * z), (math.fabs(math.sin((30.0 * x))) - 0.2)) elif z <= 0.00145: tmp = fmax(((y * 30.0) - 25.0), t_0) else: tmp = fmax((z * 30.0), t_0) return tmp
function code(x, y, z) t_0 = Float64(abs(Float64(30.0 * x)) - 0.2) tmp = 0.0 if (z <= -4.1e+35) tmp = fmax(Float64(-30.0 * z), Float64(abs(sin(Float64(30.0 * x))) - 0.2)); elseif (z <= 0.00145) tmp = fmax(Float64(Float64(y * 30.0) - 25.0), t_0); else tmp = fmax(Float64(z * 30.0), 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 (z <= -4.1e+35) tmp = max((-30.0 * z), (abs(sin((30.0 * x))) - 0.2)); elseif (z <= 0.00145) tmp = max(((y * 30.0) - 25.0), t_0); else tmp = max((z * 30.0), 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[z, -4.1e+35], N[Max[N[(-30.0 * z), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 0.00145], N[Max[N[(N[(y * 30.0), $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(z * 30.0), $MachinePrecision], t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|30 \cdot x\right| - 0.2\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\sin \left(30 \cdot x\right)\right| - 0.2\right)\\
\mathbf{elif}\;z \leq 0.00145:\\
\;\;\;\;\mathsf{max}\left(y \cdot 30 - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(z \cdot 30, t\_0\right)\\
\end{array}
\end{array}
if z < -4.0999999999999998e35Initial program 31.5%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6431.5
Applied rewrites31.5%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6431.5
Applied rewrites31.5%
Taylor expanded in z around -inf
lower-*.f6464.0
Applied rewrites64.0%
if -4.0999999999999998e35 < z < 0.00145Initial program 61.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6459.7
Applied rewrites59.7%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6443.9
Applied rewrites43.9%
Taylor expanded in x around 0
lift-*.f6477.8
Applied rewrites77.8%
if 0.00145 < z Initial program 33.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6433.8
Applied rewrites33.8%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6433.5
Applied rewrites33.5%
Taylor expanded in z around inf
*-commutativeN/A
lift-*.f6457.1
Applied rewrites57.1%
Taylor expanded in x around 0
lift-*.f6477.7
Applied rewrites77.7%
(FPCore (x y z) :precision binary64 (let* ((t_0 (- (fabs (* 30.0 x)) 0.2))) (if (<= z 0.00145) (fmax (- (* y 30.0) 25.0) t_0) (fmax (* z 30.0) t_0))))
double code(double x, double y, double z) {
double t_0 = fabs((30.0 * x)) - 0.2;
double tmp;
if (z <= 0.00145) {
tmp = fmax(((y * 30.0) - 25.0), t_0);
} else {
tmp = fmax((z * 30.0), 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 (z <= 0.00145d0) then
tmp = fmax(((y * 30.0d0) - 25.0d0), t_0)
else
tmp = fmax((z * 30.0d0), 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 (z <= 0.00145) {
tmp = fmax(((y * 30.0) - 25.0), t_0);
} else {
tmp = fmax((z * 30.0), t_0);
}
return tmp;
}
def code(x, y, z): t_0 = math.fabs((30.0 * x)) - 0.2 tmp = 0 if z <= 0.00145: tmp = fmax(((y * 30.0) - 25.0), t_0) else: tmp = fmax((z * 30.0), t_0) return tmp
function code(x, y, z) t_0 = Float64(abs(Float64(30.0 * x)) - 0.2) tmp = 0.0 if (z <= 0.00145) tmp = fmax(Float64(Float64(y * 30.0) - 25.0), t_0); else tmp = fmax(Float64(z * 30.0), 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 (z <= 0.00145) tmp = max(((y * 30.0) - 25.0), t_0); else tmp = max((z * 30.0), 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[z, 0.00145], N[Max[N[(N[(y * 30.0), $MachinePrecision] - 25.0), $MachinePrecision], t$95$0], $MachinePrecision], N[Max[N[(z * 30.0), $MachinePrecision], t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|30 \cdot x\right| - 0.2\\
\mathbf{if}\;z \leq 0.00145:\\
\;\;\;\;\mathsf{max}\left(y \cdot 30 - 25, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(z \cdot 30, t\_0\right)\\
\end{array}
\end{array}
if z < 0.00145Initial program 52.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6451.2
Applied rewrites51.2%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6434.2
Applied rewrites34.2%
Taylor expanded in x around 0
lift-*.f6463.6
Applied rewrites63.6%
if 0.00145 < z Initial program 33.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6433.8
Applied rewrites33.8%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6433.5
Applied rewrites33.5%
Taylor expanded in z around inf
*-commutativeN/A
lift-*.f6457.1
Applied rewrites57.1%
Taylor expanded in x around 0
lift-*.f6477.7
Applied rewrites77.7%
(FPCore (x y z) :precision binary64 (fmax (* z 30.0) (- (fabs (* 30.0 x)) 0.2)))
double code(double x, double y, double z) {
return fmax((z * 30.0), (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((z * 30.0d0), (abs((30.0d0 * x)) - 0.2d0))
end function
public static double code(double x, double y, double z) {
return fmax((z * 30.0), (Math.abs((30.0 * x)) - 0.2));
}
def code(x, y, z): return fmax((z * 30.0), (math.fabs((30.0 * x)) - 0.2))
function code(x, y, z) return fmax(Float64(z * 30.0), Float64(abs(Float64(30.0 * x)) - 0.2)) end
function tmp = code(x, y, z) tmp = max((z * 30.0), (abs((30.0 * x)) - 0.2)); end
code[x_, y_, z_] := N[Max[N[(z * 30.0), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{max}\left(z \cdot 30, \left|30 \cdot x\right| - 0.2\right)
\end{array}
Initial program 47.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6447.0
Applied rewrites47.0%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6446.6
Applied rewrites46.6%
Taylor expanded in z around inf
*-commutativeN/A
lift-*.f6417.1
Applied rewrites17.1%
Taylor expanded in x around 0
lift-*.f6444.4
Applied rewrites44.4%
(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 47.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lower-cos.f64N/A
distribute-rgt-neg-outN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
*-commutativeN/A
lower-*.f6447.0
Applied rewrites47.0%
Taylor expanded in z around 0
lift-sin.f64N/A
lift-*.f6446.6
Applied rewrites46.6%
Taylor expanded in x around -inf
lift-*.f6417.3
Applied rewrites17.3%
Taylor expanded in x around 0
lift-*.f6431.1
Applied rewrites31.1%
herbie shell --seed 2025130
(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)))