Gyroid sphere

Percentage Accurate: 46.3% → 98.7%
Time: 9.6s
Alternatives: 4
Speedup: 4.7×

Specification

?
\[\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
 (fmax
  (-
   (sqrt
    (+ (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0)) (pow (* z 30.0) 2.0)))
   25.0)
  (-
   (fabs
    (+
     (+
      (* (sin (* x 30.0)) (cos (* y 30.0)))
      (* (sin (* y 30.0)) (cos (* z 30.0))))
     (* (sin (* z 30.0)) (cos (* x 30.0)))))
   0.2)))
double code(double x, double y, double z) {
	return fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = fmax((sqrt(((((x * 30.0d0) ** 2.0d0) + ((y * 30.0d0) ** 2.0d0)) + ((z * 30.0d0) ** 2.0d0))) - 25.0d0), (abs((((sin((x * 30.0d0)) * cos((y * 30.0d0))) + (sin((y * 30.0d0)) * cos((z * 30.0d0)))) + (sin((z * 30.0d0)) * cos((x * 30.0d0))))) - 0.2d0))
end function
public static double code(double x, double y, double z) {
	return fmax((Math.sqrt(((Math.pow((x * 30.0), 2.0) + Math.pow((y * 30.0), 2.0)) + Math.pow((z * 30.0), 2.0))) - 25.0), (Math.abs((((Math.sin((x * 30.0)) * Math.cos((y * 30.0))) + (Math.sin((y * 30.0)) * Math.cos((z * 30.0)))) + (Math.sin((z * 30.0)) * Math.cos((x * 30.0))))) - 0.2));
}
def code(x, y, z):
	return fmax((math.sqrt(((math.pow((x * 30.0), 2.0) + math.pow((y * 30.0), 2.0)) + math.pow((z * 30.0), 2.0))) - 25.0), (math.fabs((((math.sin((x * 30.0)) * math.cos((y * 30.0))) + (math.sin((y * 30.0)) * math.cos((z * 30.0)))) + (math.sin((z * 30.0)) * math.cos((x * 30.0))))) - 0.2))
function code(x, y, z)
	return fmax(Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2))
end
function tmp = code(x, y, z)
	tmp = max((sqrt(((((x * 30.0) ^ 2.0) + ((y * 30.0) ^ 2.0)) + ((z * 30.0) ^ 2.0))) - 25.0), (abs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2));
end
code[x_, y_, z_] := N[Max[N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 4 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 46.3% accurate, 1.0× speedup?

\[\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
 (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}

Alternative 1: 98.7% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (fmax
  (- (hypot (* -30.0 y) (* -30.0 x)) 25.0)
  (- (fabs (fma (sin (* 30.0 y)) 1.0 (* z 30.0))) 0.2)))
double code(double x, double y, double z) {
	return fmax((hypot((-30.0 * y), (-30.0 * x)) - 25.0), (fabs(fma(sin((30.0 * y)), 1.0, (z * 30.0))) - 0.2));
}
function code(x, y, z)
	return fmax(Float64(hypot(Float64(-30.0 * y), Float64(-30.0 * x)) - 25.0), Float64(abs(fma(sin(Float64(30.0 * y)), 1.0, Float64(z * 30.0))) - 0.2))
end
code[x_, y_, z_] := N[Max[N[(N[Sqrt[N[(-30.0 * y), $MachinePrecision] ^ 2 + N[(-30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * 1.0 + N[(z * 30.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right)
\end{array}
Derivation
  1. Initial program 47.5%

    \[\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) \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
  4. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
    2. *-commutativeN/A

      \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
    3. lower-fma.f64N/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    4. *-commutativeN/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    5. lower-sin.f64N/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    6. *-commutativeN/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    7. lower-*.f64N/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    8. cos-neg-revN/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    9. lower-cos.f64N/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    10. distribute-lft-neg-inN/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    11. metadata-evalN/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    12. lower-*.f64N/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    13. lower-sin.f64N/A

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    14. lower-*.f6447.5

      \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
  5. Applied rewrites47.5%

    \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
  6. Taylor expanded in z around 0

    \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {y}^{2}}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
  7. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \mathsf{max}\left(\sqrt{900 \cdot {y}^{2} + 900 \cdot {x}^{2}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{max}\left(\sqrt{{y}^{2} \cdot 900 + 900 \cdot {x}^{2}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    3. unpow2N/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900 + 900 \cdot {x}^{2}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot \left(30 \cdot 30\right) + 900 \cdot {x}^{2}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    5. swap-sqrN/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(y \cdot 30\right) \cdot \left(y \cdot 30\right) + 900 \cdot {x}^{2}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    6. sqr-neg-revN/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(\mathsf{neg}\left(y \cdot 30\right)\right) \cdot \left(\mathsf{neg}\left(y \cdot 30\right)\right) + 900 \cdot {x}^{2}} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(\mathsf{neg}\left(y \cdot 30\right)\right) \cdot \left(\mathsf{neg}\left(y \cdot 30\right)\right) + 900 \cdot \left(x \cdot x\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(\mathsf{neg}\left(y \cdot 30\right)\right) \cdot \left(\mathsf{neg}\left(y \cdot 30\right)\right) + \left(30 \cdot 30\right) \cdot \left(x \cdot x\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    9. swap-sqrN/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(\mathsf{neg}\left(y \cdot 30\right)\right) \cdot \left(\mathsf{neg}\left(y \cdot 30\right)\right) + \left(30 \cdot x\right) \cdot \left(30 \cdot x\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    10. sqr-neg-revN/A

      \[\leadsto \mathsf{max}\left(\sqrt{\left(\mathsf{neg}\left(y \cdot 30\right)\right) \cdot \left(\mathsf{neg}\left(y \cdot 30\right)\right) + \left(\mathsf{neg}\left(30 \cdot x\right)\right) \cdot \left(\mathsf{neg}\left(30 \cdot x\right)\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    11. lower-hypot.f64N/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(\mathsf{neg}\left(y \cdot 30\right), \color{blue}{\mathsf{neg}\left(30 \cdot x\right)}\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(\mathsf{neg}\left(30 \cdot y\right), \mathsf{neg}\left(\color{blue}{30} \cdot x\right)\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    13. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(\left(\mathsf{neg}\left(30\right)\right) \cdot y, \mathsf{neg}\left(\color{blue}{30 \cdot x}\right)\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    14. metadata-evalN/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, \mathsf{neg}\left(\color{blue}{30} \cdot x\right)\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    15. lower-*.f64N/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, \mathsf{neg}\left(\color{blue}{30 \cdot x}\right)\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    16. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, \left(\mathsf{neg}\left(30\right)\right) \cdot \color{blue}{x}\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    17. metadata-evalN/A

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
    18. lower-*.f6472.6

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot \color{blue}{x}\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
  8. Applied rewrites72.6%

    \[\leadsto \mathsf{max}\left(\color{blue}{\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right)} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
  9. Taylor expanded in z around 0

    \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
  10. Step-by-step derivation
    1. Applied rewrites72.6%

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
    2. Taylor expanded in z around 0

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, 30 \cdot z\right)\right| - \frac{1}{5}\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lower-*.f6498.2

        \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \]
    4. Applied rewrites98.2%

      \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(-30 \cdot y, -30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \]
    5. Add Preprocessing

    Alternative 2: 75.2% accurate, 3.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(30 \cdot y\right)\\ t_1 := -30 \cdot x - 25\\ t_2 := \mathsf{max}\left(t\_1, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-296}:\\ \;\;\;\;\mathsf{max}\left(30 \cdot x - 25, \left|\mathsf{fma}\left(t\_0, \cos \left(-30 \cdot z\right), z \cdot 30\right)\right| - 0.2\right)\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{max}\left(t\_1, \left|\mathsf{fma}\left(t\_0, 1, z \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (sin (* 30.0 y)))
            (t_1 (- (* -30.0 x) 25.0))
            (t_2 (fmax t_1 (- (fabs (fma (* y 30.0) 1.0 (sin (* 30.0 z)))) 0.2))))
       (if (<= y -4.8e+26)
         t_2
         (if (<= y 3.4e-296)
           (fmax
            (- (* 30.0 x) 25.0)
            (- (fabs (fma t_0 (cos (* -30.0 z)) (* z 30.0))) 0.2))
           (if (<= y 7e+63)
             (fmax t_1 (- (fabs (fma t_0 1.0 (* z 30.0))) 0.2))
             t_2)))))
    double code(double x, double y, double z) {
    	double t_0 = sin((30.0 * y));
    	double t_1 = (-30.0 * x) - 25.0;
    	double t_2 = fmax(t_1, (fabs(fma((y * 30.0), 1.0, sin((30.0 * z)))) - 0.2));
    	double tmp;
    	if (y <= -4.8e+26) {
    		tmp = t_2;
    	} else if (y <= 3.4e-296) {
    		tmp = fmax(((30.0 * x) - 25.0), (fabs(fma(t_0, cos((-30.0 * z)), (z * 30.0))) - 0.2));
    	} else if (y <= 7e+63) {
    		tmp = fmax(t_1, (fabs(fma(t_0, 1.0, (z * 30.0))) - 0.2));
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	t_0 = sin(Float64(30.0 * y))
    	t_1 = Float64(Float64(-30.0 * x) - 25.0)
    	t_2 = fmax(t_1, Float64(abs(fma(Float64(y * 30.0), 1.0, sin(Float64(30.0 * z)))) - 0.2))
    	tmp = 0.0
    	if (y <= -4.8e+26)
    		tmp = t_2;
    	elseif (y <= 3.4e-296)
    		tmp = fmax(Float64(Float64(30.0 * x) - 25.0), Float64(abs(fma(t_0, cos(Float64(-30.0 * z)), Float64(z * 30.0))) - 0.2));
    	elseif (y <= 7e+63)
    		tmp = fmax(t_1, Float64(abs(fma(t_0, 1.0, Float64(z * 30.0))) - 0.2));
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(-30.0 * x), $MachinePrecision] - 25.0), $MachinePrecision]}, Block[{t$95$2 = N[Max[t$95$1, N[(N[Abs[N[(N[(y * 30.0), $MachinePrecision] * 1.0 + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -4.8e+26], t$95$2, If[LessEqual[y, 3.4e-296], N[Max[N[(N[(30.0 * x), $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(t$95$0 * N[Cos[N[(-30.0 * z), $MachinePrecision]], $MachinePrecision] + N[(z * 30.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 7e+63], N[Max[t$95$1, N[(N[Abs[N[(t$95$0 * 1.0 + N[(z * 30.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \sin \left(30 \cdot y\right)\\
    t_1 := -30 \cdot x - 25\\
    t_2 := \mathsf{max}\left(t\_1, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)\\
    \mathbf{if}\;y \leq -4.8 \cdot 10^{+26}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;y \leq 3.4 \cdot 10^{-296}:\\
    \;\;\;\;\mathsf{max}\left(30 \cdot x - 25, \left|\mathsf{fma}\left(t\_0, \cos \left(-30 \cdot z\right), z \cdot 30\right)\right| - 0.2\right)\\
    
    \mathbf{elif}\;y \leq 7 \cdot 10^{+63}:\\
    \;\;\;\;\mathsf{max}\left(t\_1, \left|\mathsf{fma}\left(t\_0, 1, z \cdot 30\right)\right| - 0.2\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -4.80000000000000009e26 or 7.00000000000000059e63 < y

      1. Initial program 35.2%

        \[\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) \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
        2. *-commutativeN/A

          \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        4. *-commutativeN/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        5. lower-sin.f64N/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        6. *-commutativeN/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        7. lower-*.f64N/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        8. cos-neg-revN/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        9. lower-cos.f64N/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        10. distribute-lft-neg-inN/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        11. metadata-evalN/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        12. lower-*.f64N/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        13. lower-sin.f64N/A

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        14. lower-*.f6435.2

          \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
      5. Applied rewrites35.2%

        \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
      6. Taylor expanded in x around -inf

        \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
      7. Step-by-step derivation
        1. lower-*.f6413.9

          \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
      8. Applied rewrites13.9%

        \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
      9. Taylor expanded in z around 0

        \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
      10. Step-by-step derivation
        1. Applied rewrites13.8%

          \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        2. Taylor expanded in y around 0

          \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(30 \cdot y, 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          2. lower-*.f6476.5

            \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        4. Applied rewrites76.5%

          \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]

        if -4.80000000000000009e26 < y < 3.39999999999999997e-296

        1. Initial program 58.1%

          \[\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) \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
          2. *-commutativeN/A

            \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          4. *-commutativeN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          5. lower-sin.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          6. *-commutativeN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          7. lower-*.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          8. cos-neg-revN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          9. lower-cos.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          10. distribute-lft-neg-inN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          11. metadata-evalN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          12. lower-*.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          13. lower-sin.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          14. lower-*.f6458.1

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        5. Applied rewrites58.1%

          \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
        6. Taylor expanded in x around inf

          \[\leadsto \mathsf{max}\left(\color{blue}{30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        7. Step-by-step derivation
          1. lower-*.f6453.1

            \[\leadsto \mathsf{max}\left(30 \cdot \color{blue}{x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        8. Applied rewrites53.1%

          \[\leadsto \mathsf{max}\left(\color{blue}{30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        9. Taylor expanded in z around 0

          \[\leadsto \mathsf{max}\left(30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), 30 \cdot z\right)\right| - \frac{1}{5}\right) \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{max}\left(30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), z \cdot 30\right)\right| - \frac{1}{5}\right) \]
          2. lower-*.f6487.1

            \[\leadsto \mathsf{max}\left(30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), z \cdot 30\right)\right| - 0.2\right) \]
        11. Applied rewrites87.1%

          \[\leadsto \mathsf{max}\left(30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), z \cdot 30\right)\right| - 0.2\right) \]

        if 3.39999999999999997e-296 < y < 7.00000000000000059e63

        1. Initial program 55.7%

          \[\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) \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
          2. *-commutativeN/A

            \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          4. *-commutativeN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          5. lower-sin.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          6. *-commutativeN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          7. lower-*.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          8. cos-neg-revN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          9. lower-cos.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          10. distribute-lft-neg-inN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          11. metadata-evalN/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          12. lower-*.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          13. lower-sin.f64N/A

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          14. lower-*.f6455.7

            \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        5. Applied rewrites55.7%

          \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
        6. Taylor expanded in x around -inf

          \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        7. Step-by-step derivation
          1. lower-*.f6450.2

            \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        8. Applied rewrites50.2%

          \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
        9. Taylor expanded in z around 0

          \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
        10. Step-by-step derivation
          1. Applied rewrites50.2%

            \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
          2. Taylor expanded in z around 0

            \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, 30 \cdot z\right)\right| - \frac{1}{5}\right) \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - \frac{1}{5}\right) \]
            2. lower-*.f6488.1

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \]
          4. Applied rewrites88.1%

            \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \]
        11. Recombined 3 regimes into one program.
        12. Add Preprocessing

        Alternative 3: 75.1% accurate, 4.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := -30 \cdot x - 25\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{+55} \lor \neg \left(y \leq 7 \cdot 10^{+63}\right):\\ \;\;\;\;\mathsf{max}\left(t\_0, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(t\_0, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (- (* -30.0 x) 25.0)))
           (if (or (<= y -1.75e+55) (not (<= y 7e+63)))
             (fmax t_0 (- (fabs (fma (* y 30.0) 1.0 (sin (* 30.0 z)))) 0.2))
             (fmax t_0 (- (fabs (fma (sin (* 30.0 y)) 1.0 (* z 30.0))) 0.2)))))
        double code(double x, double y, double z) {
        	double t_0 = (-30.0 * x) - 25.0;
        	double tmp;
        	if ((y <= -1.75e+55) || !(y <= 7e+63)) {
        		tmp = fmax(t_0, (fabs(fma((y * 30.0), 1.0, sin((30.0 * z)))) - 0.2));
        	} else {
        		tmp = fmax(t_0, (fabs(fma(sin((30.0 * y)), 1.0, (z * 30.0))) - 0.2));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	t_0 = Float64(Float64(-30.0 * x) - 25.0)
        	tmp = 0.0
        	if ((y <= -1.75e+55) || !(y <= 7e+63))
        		tmp = fmax(t_0, Float64(abs(fma(Float64(y * 30.0), 1.0, sin(Float64(30.0 * z)))) - 0.2));
        	else
        		tmp = fmax(t_0, Float64(abs(fma(sin(Float64(30.0 * y)), 1.0, Float64(z * 30.0))) - 0.2));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-30.0 * x), $MachinePrecision] - 25.0), $MachinePrecision]}, If[Or[LessEqual[y, -1.75e+55], N[Not[LessEqual[y, 7e+63]], $MachinePrecision]], N[Max[t$95$0, N[(N[Abs[N[(N[(y * 30.0), $MachinePrecision] * 1.0 + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[t$95$0, N[(N[Abs[N[(N[Sin[N[(30.0 * y), $MachinePrecision]], $MachinePrecision] * 1.0 + N[(z * 30.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := -30 \cdot x - 25\\
        \mathbf{if}\;y \leq -1.75 \cdot 10^{+55} \lor \neg \left(y \leq 7 \cdot 10^{+63}\right):\\
        \;\;\;\;\mathsf{max}\left(t\_0, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{max}\left(t\_0, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.75000000000000005e55 or 7.00000000000000059e63 < y

          1. Initial program 35.1%

            \[\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) \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
            2. *-commutativeN/A

              \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
            3. lower-fma.f64N/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            4. *-commutativeN/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            5. lower-sin.f64N/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            6. *-commutativeN/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            7. lower-*.f64N/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            8. cos-neg-revN/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            9. lower-cos.f64N/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            10. distribute-lft-neg-inN/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            11. metadata-evalN/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            12. lower-*.f64N/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            13. lower-sin.f64N/A

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            14. lower-*.f6435.1

              \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
          5. Applied rewrites35.1%

            \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
          6. Taylor expanded in x around -inf

            \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          7. Step-by-step derivation
            1. lower-*.f6412.5

              \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
          8. Applied rewrites12.5%

            \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
          9. Taylor expanded in z around 0

            \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
          10. Step-by-step derivation
            1. Applied rewrites12.5%

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            2. Taylor expanded in y around 0

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(30 \cdot y, 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            3. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              2. lower-*.f6477.9

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            4. Applied rewrites77.9%

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]

            if -1.75000000000000005e55 < y < 7.00000000000000059e63

            1. Initial program 56.0%

              \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
              2. *-commutativeN/A

                \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
              3. lower-fma.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              4. *-commutativeN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              5. lower-sin.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              6. *-commutativeN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              7. lower-*.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              8. cos-neg-revN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              9. lower-cos.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              10. distribute-lft-neg-inN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              11. metadata-evalN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              12. lower-*.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              13. lower-sin.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              14. lower-*.f6456.0

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            5. Applied rewrites56.0%

              \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
            6. Taylor expanded in x around -inf

              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            7. Step-by-step derivation
              1. lower-*.f6446.5

                \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            8. Applied rewrites46.5%

              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            9. Taylor expanded in z around 0

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            10. Step-by-step derivation
              1. Applied rewrites46.5%

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
              2. Taylor expanded in z around 0

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, 30 \cdot z\right)\right| - \frac{1}{5}\right) \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - \frac{1}{5}\right) \]
                2. lower-*.f6482.8

                  \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \]
              4. Applied rewrites82.8%

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right) \]
            11. Recombined 2 regimes into one program.
            12. Final simplification80.8%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+55} \lor \neg \left(y \leq 7 \cdot 10^{+63}\right):\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, z \cdot 30\right)\right| - 0.2\right)\\ \end{array} \]
            13. Add Preprocessing

            Alternative 4: 56.8% accurate, 4.7× speedup?

            \[\begin{array}{l} \\ \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (fmax
              (- (* -30.0 x) 25.0)
              (- (fabs (fma (* y 30.0) 1.0 (sin (* 30.0 z)))) 0.2)))
            double code(double x, double y, double z) {
            	return fmax(((-30.0 * x) - 25.0), (fabs(fma((y * 30.0), 1.0, sin((30.0 * z)))) - 0.2));
            }
            
            function code(x, y, z)
            	return fmax(Float64(Float64(-30.0 * x) - 25.0), Float64(abs(fma(Float64(y * 30.0), 1.0, sin(Float64(30.0 * z)))) - 0.2))
            end
            
            code[x_, y_, z_] := N[Max[N[(N[(-30.0 * x), $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(y * 30.0), $MachinePrecision] * 1.0 + N[Sin[N[(30.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right)
            \end{array}
            
            Derivation
            1. Initial program 47.5%

              \[\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) \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \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|\color{blue}{\sin \left(30 \cdot z\right) + \cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right)}\right| - \frac{1}{5}\right) \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \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|\cos \left(30 \cdot z\right) \cdot \sin \left(30 \cdot y\right) + \color{blue}{\sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
              2. *-commutativeN/A

                \[\leadsto \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|\sin \left(30 \cdot y\right) \cdot \cos \left(30 \cdot z\right) + \sin \color{blue}{\left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
              3. lower-fma.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \color{blue}{\cos \left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              4. *-commutativeN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              5. lower-sin.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(y \cdot 30\right), \cos \color{blue}{\left(30 \cdot z\right)}, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              6. *-commutativeN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              7. lower-*.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\color{blue}{30} \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              8. cos-neg-revN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              9. lower-cos.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\mathsf{neg}\left(30 \cdot z\right)\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              10. distribute-lft-neg-inN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(\left(\mathsf{neg}\left(30\right)\right) \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              11. metadata-evalN/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              12. lower-*.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              13. lower-sin.f64N/A

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              14. lower-*.f6447.5

                \[\leadsto \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|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            5. Applied rewrites47.5%

              \[\leadsto \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|\color{blue}{\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)}\right| - 0.2\right) \]
            6. Taylor expanded in x around -inf

              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            7. Step-by-step derivation
              1. lower-*.f6432.7

                \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            8. Applied rewrites32.7%

              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x} - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), \cos \left(-30 \cdot z\right), \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
            9. Taylor expanded in z around 0

              \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
            10. Step-by-step derivation
              1. Applied rewrites32.7%

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(\sin \left(30 \cdot y\right), 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
              2. Taylor expanded in y around 0

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(30 \cdot y, 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - \frac{1}{5}\right) \]
                2. lower-*.f6460.0

                  \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
              4. Applied rewrites60.0%

                \[\leadsto \mathsf{max}\left(-30 \cdot x - 25, \left|\mathsf{fma}\left(y \cdot 30, 1, \sin \left(30 \cdot z\right)\right)\right| - 0.2\right) \]
              5. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2025026 
              (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)))