Gyroid sphere

Percentage Accurate: 46.6% → 71.8%
Time: 6.0s
Alternatives: 14
Speedup: 4.8×

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}

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 14 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.6% 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: 71.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(30 \cdot x\right)\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, t\_0\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+197}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, t\_0\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \left|\mathsf{fma}\left(t\_0, \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (sin (* 30.0 x))))
   (if (<= z -1.9e+34)
     (fmax
      (* -30.0 z)
      (-
       (fabs
        (+
         (fma (* (cos (* z 30.0)) y) 30.0 t_0)
         (* (sin (* z 30.0)) (cos (* x 30.0)))))
       0.2))
     (if (<= z 1.15e+197)
       (fmax (- (* (+ (/ 25.0 x) 30.0) x)) (- (fabs (fma y 30.0 t_0)) 0.2))
       (fmax
        (* (- 30.0 (/ 25.0 z)) z)
        (- (fabs (fma t_0 (cos (* y 30.0)) (sin (* y 30.0)))) 0.2))))))
double code(double x, double y, double z) {
	double t_0 = sin((30.0 * x));
	double tmp;
	if (z <= -1.9e+34) {
		tmp = fmax((-30.0 * z), (fabs((fma((cos((z * 30.0)) * y), 30.0, t_0) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2));
	} else if (z <= 1.15e+197) {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs(fma(y, 30.0, t_0)) - 0.2));
	} else {
		tmp = fmax(((30.0 - (25.0 / z)) * z), (fabs(fma(t_0, cos((y * 30.0)), sin((y * 30.0)))) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = sin(Float64(30.0 * x))
	tmp = 0.0
	if (z <= -1.9e+34)
		tmp = fmax(Float64(-30.0 * z), Float64(abs(Float64(fma(Float64(cos(Float64(z * 30.0)) * y), 30.0, t_0) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2));
	elseif (z <= 1.15e+197)
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(fma(y, 30.0, t_0)) - 0.2));
	else
		tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / z)) * z), Float64(abs(fma(t_0, cos(Float64(y * 30.0)), sin(Float64(y * 30.0)))) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.9e+34], N[Max[N[(-30.0 * z), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision] * 30.0 + t$95$0), $MachinePrecision] + N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 1.15e+197], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(y * 30.0 + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[Abs[N[(t$95$0 * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot x\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, t\_0\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right)\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+197}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, t\_0\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \left|\mathsf{fma}\left(t\_0, \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9000000000000001e34

    1. Initial program 46.6%

      \[\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. Taylor expanded in z around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \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| - \frac{1}{5}\right) \]
    3. Step-by-step derivation
      1. lower-*.f6417.6

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{z}, \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) \]
    4. Applied rewrites17.6%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \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) \]
    5. Taylor expanded in y around 0

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

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

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

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

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, \sin \left(30 \cdot x\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. lift-cos.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, \sin \left(30 \cdot x\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lift-*.f64N/A

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, \sin \left(30 \cdot x\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites37.2%

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

    if -1.9000000000000001e34 < z < 1.15e197

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

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

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

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

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6457.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites57.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]

    if 1.15e197 < z

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{z}\right) \cdot z, \left|\mathsf{fma}\left(\sin \left(30 \cdot x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      6. mult-flip-revN/A

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

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

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

Alternative 2: 71.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(30 \cdot x\right)\\ t_1 := \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\\ t_2 := \cos \left(z \cdot 30\right)\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(t\_2 \cdot y, 30, t\_0\right) + t\_1\right| - 0.2\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+197}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, t\_0\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot t\_2\right) + t\_1\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (sin (* 30.0 x)))
        (t_1 (* (sin (* z 30.0)) (cos (* x 30.0))))
        (t_2 (cos (* z 30.0))))
   (if (<= z -1.9e+34)
     (fmax (* -30.0 z) (- (fabs (+ (fma (* t_2 y) 30.0 t_0) t_1)) 0.2))
     (if (<= z 1.15e+197)
       (fmax (- (* (+ (/ 25.0 x) 30.0) x)) (- (fabs (fma y 30.0 t_0)) 0.2))
       (fmax
        (* (- 30.0 (/ 25.0 z)) z)
        (-
         (fabs
          (+
           (+ (* (sin (* x 30.0)) (cos (* y 30.0))) (* (sin (* y 30.0)) t_2))
           t_1))
         0.2))))))
double code(double x, double y, double z) {
	double t_0 = sin((30.0 * x));
	double t_1 = sin((z * 30.0)) * cos((x * 30.0));
	double t_2 = cos((z * 30.0));
	double tmp;
	if (z <= -1.9e+34) {
		tmp = fmax((-30.0 * z), (fabs((fma((t_2 * y), 30.0, t_0) + t_1)) - 0.2));
	} else if (z <= 1.15e+197) {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs(fma(y, 30.0, t_0)) - 0.2));
	} else {
		tmp = fmax(((30.0 - (25.0 / z)) * z), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * t_2)) + t_1)) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = sin(Float64(30.0 * x))
	t_1 = Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0)))
	t_2 = cos(Float64(z * 30.0))
	tmp = 0.0
	if (z <= -1.9e+34)
		tmp = fmax(Float64(-30.0 * z), Float64(abs(Float64(fma(Float64(t_2 * y), 30.0, t_0) + t_1)) - 0.2));
	elseif (z <= 1.15e+197)
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(fma(y, 30.0, t_0)) - 0.2));
	else
		tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / z)) * z), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * t_2)) + t_1)) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.9e+34], N[Max[N[(-30.0 * z), $MachinePrecision], N[(N[Abs[N[(N[(N[(t$95$2 * y), $MachinePrecision] * 30.0 + t$95$0), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 1.15e+197], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(y * 30.0 + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / z), $MachinePrecision]), $MachinePrecision] * z), $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] * t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(30 \cdot x\right)\\
t_1 := \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\\
t_2 := \cos \left(z \cdot 30\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(t\_2 \cdot y, 30, t\_0\right) + t\_1\right| - 0.2\right)\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+197}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, t\_0\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot t\_2\right) + t\_1\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9000000000000001e34

    1. Initial program 46.6%

      \[\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. Taylor expanded in z around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \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| - \frac{1}{5}\right) \]
    3. Step-by-step derivation
      1. lower-*.f6417.6

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{z}, \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) \]
    4. Applied rewrites17.6%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \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) \]
    5. Taylor expanded in y around 0

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

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

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

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

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, \sin \left(30 \cdot x\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. lift-cos.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, \sin \left(30 \cdot x\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lift-*.f64N/A

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot z, \left|\mathsf{fma}\left(\cos \left(z \cdot 30\right) \cdot y, 30, \sin \left(30 \cdot x\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites37.2%

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

    if -1.9000000000000001e34 < z < 1.15e197

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

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

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

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

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6457.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites57.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]

    if 1.15e197 < z

    1. Initial program 46.6%

      \[\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. Taylor expanded in z around inf

      \[\leadsto \mathsf{max}\left(\color{blue}{z \cdot \left(30 - 25 \cdot \frac{1}{z}\right)}, \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| - \frac{1}{5}\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{z}\right) \cdot \color{blue}{z}, \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| - \frac{1}{5}\right) \]
      2. lower-special--N/A

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

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{z}\right) \cdot \color{blue}{z}, \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| - \frac{1}{5}\right) \]
      4. lower-special--N/A

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

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{z}\right) \cdot z, \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| - \frac{1}{5}\right) \]
      6. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \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| - \frac{1}{5}\right) \]
      7. lower-/.f6430.8

        \[\leadsto \mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \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) \]
    4. Applied rewrites30.8%

      \[\leadsto \mathsf{max}\left(\color{blue}{\left(30 - \frac{25}{z}\right) \cdot z}, \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) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 71.2% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y \cdot 30\right)\\ t_1 := \sin \left(30 \cdot x\right)\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|t\_0\right| - 0.2\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+197}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, t\_1\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \left|\mathsf{fma}\left(t\_1, \cos \left(y \cdot 30\right), t\_0\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (sin (* y 30.0))) (t_1 (sin (* 30.0 x))))
   (if (<= z -6.8e+34)
     (fmax (* -30.0 z) (- (fabs t_0) 0.2))
     (if (<= z 1.15e+197)
       (fmax (- (* (+ (/ 25.0 x) 30.0) x)) (- (fabs (fma y 30.0 t_1)) 0.2))
       (fmax
        (* (- 30.0 (/ 25.0 z)) z)
        (- (fabs (fma t_1 (cos (* y 30.0)) t_0)) 0.2))))))
double code(double x, double y, double z) {
	double t_0 = sin((y * 30.0));
	double t_1 = sin((30.0 * x));
	double tmp;
	if (z <= -6.8e+34) {
		tmp = fmax((-30.0 * z), (fabs(t_0) - 0.2));
	} else if (z <= 1.15e+197) {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs(fma(y, 30.0, t_1)) - 0.2));
	} else {
		tmp = fmax(((30.0 - (25.0 / z)) * z), (fabs(fma(t_1, cos((y * 30.0)), t_0)) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = sin(Float64(y * 30.0))
	t_1 = sin(Float64(30.0 * x))
	tmp = 0.0
	if (z <= -6.8e+34)
		tmp = fmax(Float64(-30.0 * z), Float64(abs(t_0) - 0.2));
	elseif (z <= 1.15e+197)
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(fma(y, 30.0, t_1)) - 0.2));
	else
		tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / z)) * z), Float64(abs(fma(t_1, cos(Float64(y * 30.0)), t_0)) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -6.8e+34], N[Max[N[(-30.0 * z), $MachinePrecision], N[(N[Abs[t$95$0], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 1.15e+197], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(y * 30.0 + t$95$1), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(30.0 - N[(25.0 / z), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[Abs[N[(t$95$1 * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(y \cdot 30\right)\\
t_1 := \sin \left(30 \cdot x\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|t\_0\right| - 0.2\right)\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+197}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, t\_1\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{z}\right) \cdot z, \left|\mathsf{fma}\left(t\_1, \cos \left(y \cdot 30\right), t\_0\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.7999999999999999e34

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in z around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{z}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites16.8%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]

    if -6.7999999999999999e34 < z < 1.15e197

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

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

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

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

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6457.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites57.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]

    if 1.15e197 < z

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. Taylor expanded in z around inf

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

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

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

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

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

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{z}\right) \cdot z, \left|\mathsf{fma}\left(\sin \left(30 \cdot x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      6. mult-flip-revN/A

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

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

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

Alternative 4: 70.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25\\ t_1 := \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\ \mathbf{if}\;\mathsf{max}\left(t\_0, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 5 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{max}\left(t\_0, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_1\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (-
          (sqrt
           (+
            (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
            (pow (* z 30.0) 2.0)))
          25.0))
        (t_1 (- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2)))
   (if (<=
        (fmax
         t_0
         (-
          (fabs
           (+
            (+
             (* (sin (* x 30.0)) (cos (* y 30.0)))
             (* (sin (* y 30.0)) (cos (* z 30.0))))
            (* (sin (* z 30.0)) (cos (* x 30.0)))))
          0.2))
        5e+143)
     (fmax t_0 t_1)
     (fmax (* -30.0 x) t_1))))
double code(double x, double y, double z) {
	double t_0 = sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0;
	double t_1 = fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2;
	double tmp;
	if (fmax(t_0, (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)) <= 5e+143) {
		tmp = fmax(t_0, t_1);
	} else {
		tmp = fmax((-30.0 * x), t_1);
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0)
	t_1 = Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2)
	tmp = 0.0
	if (fmax(t_0, Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) <= 5e+143)
		tmp = fmax(t_0, t_1);
	else
		tmp = fmax(Float64(-30.0 * x), t_1);
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]}, If[LessEqual[N[Max[t$95$0, N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 5e+143], N[Max[t$95$0, t$95$1], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], t$95$1], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25\\
t_1 := \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\\
\mathbf{if}\;\mathsf{max}\left(t\_0, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{max}\left(t\_0, t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 5.00000000000000012e143

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. Taylor expanded in y 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|\sin \left(30 \cdot x\right) + \color{blue}{30 \cdot y}\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(30 \cdot x\right) + y \cdot 30\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|y \cdot 30 + \sin \left(30 \cdot x\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(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-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(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6445.9

        \[\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(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]

    if 5.00000000000000012e143 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64)))

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.6%

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right) + y \cdot 30\right| - \frac{1}{5}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|y \cdot 30 + \sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6445.6

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites45.6%

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 70.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25\\ t_1 := \sin \left(y \cdot 30\right)\\ \mathbf{if}\;\mathsf{max}\left(t\_0, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_1 \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 5 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{max}\left(t\_0, \left|t\_1\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (-
          (sqrt
           (+
            (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
            (pow (* z 30.0) 2.0)))
          25.0))
        (t_1 (sin (* y 30.0))))
   (if (<=
        (fmax
         t_0
         (-
          (fabs
           (+
            (+ (* (sin (* x 30.0)) (cos (* y 30.0))) (* t_1 (cos (* z 30.0))))
            (* (sin (* z 30.0)) (cos (* x 30.0)))))
          0.2))
        5e+143)
     (fmax t_0 (- (fabs t_1) 0.2))
     (fmax (* -30.0 x) (- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2)))))
double code(double x, double y, double z) {
	double t_0 = sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0;
	double t_1 = sin((y * 30.0));
	double tmp;
	if (fmax(t_0, (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (t_1 * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)) <= 5e+143) {
		tmp = fmax(t_0, (fabs(t_1) - 0.2));
	} else {
		tmp = fmax((-30.0 * x), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0)
	t_1 = sin(Float64(y * 30.0))
	tmp = 0.0
	if (fmax(t_0, Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(t_1 * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) <= 5e+143)
		tmp = fmax(t_0, Float64(abs(t_1) - 0.2));
	else
		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Max[t$95$0, N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * 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], 5e+143], N[Max[t$95$0, N[(N[Abs[t$95$1], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25\\
t_1 := \sin \left(y \cdot 30\right)\\
\mathbf{if}\;\mathsf{max}\left(t\_0, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_1 \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{max}\left(t\_0, \left|t\_1\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 5.00000000000000012e143

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]

    if 5.00000000000000012e143 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64)))

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.6%

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right) + y \cdot 30\right| - \frac{1}{5}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|y \cdot 30 + \sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6445.6

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites45.6%

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 70.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y \cdot 30\right)\\ \mathbf{if}\;\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 5 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|t\_0\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (sin (* y 30.0))))
   (if (<=
        (fmax
         (-
          (sqrt
           (+
            (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
            (pow (* z 30.0) 2.0)))
          25.0)
         (-
          (fabs
           (+
            (+ (* (sin (* x 30.0)) (cos (* y 30.0))) (* t_0 (cos (* z 30.0))))
            (* (sin (* z 30.0)) (cos (* x 30.0)))))
          0.2))
        5e+143)
     (fmax
      (- (sqrt (fma (* x x) 900.0 (* 900.0 (fma y y (* z z))))) 25.0)
      (- (fabs t_0) 0.2))
     (fmax (* -30.0 x) (- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2)))))
double code(double x, double y, double z) {
	double t_0 = sin((y * 30.0));
	double tmp;
	if (fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (t_0 * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)) <= 5e+143) {
		tmp = fmax((sqrt(fma((x * x), 900.0, (900.0 * fma(y, y, (z * z))))) - 25.0), (fabs(t_0) - 0.2));
	} else {
		tmp = fmax((-30.0 * x), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = sin(Float64(y * 30.0))
	tmp = 0.0
	if (fmax(Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(t_0 * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) <= 5e+143)
		tmp = fmax(Float64(sqrt(fma(Float64(x * x), 900.0, Float64(900.0 * fma(y, y, Float64(z * z))))) - 25.0), Float64(abs(t_0) - 0.2));
	else
		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Max[N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * 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], 5e+143], N[Max[N[(N[Sqrt[N[(N[(x * x), $MachinePrecision] * 900.0 + N[(900.0 * N[(y * y + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[t$95$0], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(y \cdot 30\right)\\
\mathbf{if}\;\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|t\_0\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 5.00000000000000012e143

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(x \cdot x, 900, 900 \cdot \mathsf{fma}\left(y, y, z \cdot z\right)\right)} - 25, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.f6445.8

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

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

    if 5.00000000000000012e143 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64)))

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.6%

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right) + y \cdot 30\right| - \frac{1}{5}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|y \cdot 30 + \sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6445.6

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites45.6%

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 64.6% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -6.8e+34)
   (fmax (* -30.0 z) (- (fabs (sin (* y 30.0))) 0.2))
   (fmax
    (- (* (+ (/ 25.0 x) 30.0) x))
    (- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -6.8e+34) {
		tmp = fmax((-30.0 * z), (fabs(sin((y * 30.0))) - 0.2));
	} else {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (z <= -6.8e+34)
		tmp = fmax(Float64(-30.0 * z), Float64(abs(sin(Float64(y * 30.0))) - 0.2));
	else
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[z, -6.8e+34], N[Max[N[(-30.0 * z), $MachinePrecision], N[(N[Abs[N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.7999999999999999e34

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in z around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{z}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites16.8%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]

    if -6.7999999999999999e34 < z

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

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

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

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

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6457.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites57.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 57.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y \cdot 30\right)\\ \mathbf{if}\;\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 2 \cdot 10^{+20}:\\ \;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{x}\right) \cdot x, \left|t\_0\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (sin (* y 30.0))))
   (if (<=
        (fmax
         (-
          (sqrt
           (+
            (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
            (pow (* z 30.0) 2.0)))
          25.0)
         (-
          (fabs
           (+
            (+ (* (sin (* x 30.0)) (cos (* y 30.0))) (* t_0 (cos (* z 30.0))))
            (* (sin (* z 30.0)) (cos (* x 30.0)))))
          0.2))
        2e+20)
     (fmax (* (- 30.0 (/ 25.0 x)) x) (- (fabs t_0) 0.2))
     (fmax (* -30.0 x) (- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2)))))
double code(double x, double y, double z) {
	double t_0 = sin((y * 30.0));
	double tmp;
	if (fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (t_0 * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)) <= 2e+20) {
		tmp = fmax(((30.0 - (25.0 / x)) * x), (fabs(t_0) - 0.2));
	} else {
		tmp = fmax((-30.0 * x), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	t_0 = sin(Float64(y * 30.0))
	tmp = 0.0
	if (fmax(Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(t_0 * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) <= 2e+20)
		tmp = fmax(Float64(Float64(30.0 - Float64(25.0 / x)) * x), Float64(abs(t_0) - 0.2));
	else
		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Max[N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * 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], 2e+20], N[Max[N[(N[(30.0 - N[(25.0 / x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[Abs[t$95$0], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(y \cdot 30\right)\\
\mathbf{if}\;\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq 2 \cdot 10^{+20}:\\
\;\;\;\;\mathsf{max}\left(\left(30 - \frac{25}{x}\right) \cdot x, \left|t\_0\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < 2e20

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around inf

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

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{x}\right) \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lower-special--N/A

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{x}\right) \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-special--N/A

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{max}\left(\left(30 - 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(\left(30 - \frac{25}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. lower-/.f6428.6

        \[\leadsto \mathsf{max}\left(\left(30 - \frac{25}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites28.6%

      \[\leadsto \mathsf{max}\left(\color{blue}{\left(30 - \frac{25}{x}\right) \cdot x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]

    if 2e20 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64)))

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.6%

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right) + y \cdot 30\right| - \frac{1}{5}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|y \cdot 30 + \sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6445.6

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites45.6%

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 57.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq -0.1:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (fmax
       (-
        (sqrt
         (+
          (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0))
          (pow (* z 30.0) 2.0)))
        25.0)
       (-
        (fabs
         (+
          (+
           (* (sin (* x 30.0)) (cos (* y 30.0)))
           (* (sin (* y 30.0)) (cos (* z 30.0))))
          (* (sin (* z 30.0)) (cos (* x 30.0)))))
        0.2))
      -0.1)
   (fmax
    (- (* (+ (/ 25.0 x) 30.0) x))
    (- (fabs (* (fma -4500.0 (* y y) 30.0) y)) 0.2))
   (fmax (* -30.0 x) (- (fabs (fma y 30.0 (sin (* 30.0 x)))) 0.2))))
double code(double x, double y, double z) {
	double tmp;
	if (fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2)) <= -0.1) {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs((fma(-4500.0, (y * y), 30.0) * y)) - 0.2));
	} else {
		tmp = fmax((-30.0 * x), (fabs(fma(y, 30.0, sin((30.0 * x)))) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (fmax(Float64(sqrt(Float64(Float64((Float64(x * 30.0) ^ 2.0) + (Float64(y * 30.0) ^ 2.0)) + (Float64(z * 30.0) ^ 2.0))) - 25.0), Float64(abs(Float64(Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))) + Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))))) - 0.2)) <= -0.1)
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(Float64(fma(-4500.0, Float64(y * y), 30.0) * y)) - 0.2));
	else
		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(y, 30.0, sin(Float64(30.0 * x)))) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[Max[N[(N[Sqrt[N[(N[(N[Power[N[(x * 30.0), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(y * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[(z * 30.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], -0.1], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(N[(-4500.0 * N[(y * y), $MachinePrecision] + 30.0), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(y * 30.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \leq -0.1:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64))) < -0.10000000000000001

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|y \cdot \left(30 + \color{blue}{-4500 \cdot {y}^{2}}\right)\right| - \frac{1}{5}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(-4500 \cdot {y}^{2} + 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, {y}^{2}, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      6. lift-*.f6427.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
    13. Applied rewrites27.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]

    if -0.10000000000000001 < (fmax.f64 (-.f64 (sqrt.f64 (+.f64 (+.f64 (pow.f64 (*.f64 x #s(literal 30 binary64)) #s(literal 2 binary64)) (pow.f64 (*.f64 y #s(literal 30 binary64)) #s(literal 2 binary64))) (pow.f64 (*.f64 z #s(literal 30 binary64)) #s(literal 2 binary64)))) #s(literal 25 binary64)) (-.f64 (fabs.f64 (+.f64 (+.f64 (*.f64 (sin.f64 (*.f64 x #s(literal 30 binary64))) (cos.f64 (*.f64 y #s(literal 30 binary64)))) (*.f64 (sin.f64 (*.f64 y #s(literal 30 binary64))) (cos.f64 (*.f64 z #s(literal 30 binary64))))) (*.f64 (sin.f64 (*.f64 z #s(literal 30 binary64))) (cos.f64 (*.f64 x #s(literal 30 binary64)))))) #s(literal 1/5 binary64)))

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.6%

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

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

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right) + y \cdot 30\right| - \frac{1}{5}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|y \cdot 30 + \sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      4. lift-sin.f64N/A

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-*.f6445.6

        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, 30, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
    13. Applied rewrites45.6%

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(y, \color{blue}{30}, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 39.7% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+26}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -3.9e+26)
   (fmax (* -30.0 z) (- (fabs (sin (* y 30.0))) 0.2))
   (fmax
    (- (* (+ (/ 25.0 x) 30.0) x))
    (- (fabs (* (fma -4500.0 (* y y) 30.0) y)) 0.2))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -3.9e+26) {
		tmp = fmax((-30.0 * z), (fabs(sin((y * 30.0))) - 0.2));
	} else {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs((fma(-4500.0, (y * y), 30.0) * y)) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (z <= -3.9e+26)
		tmp = fmax(Float64(-30.0 * z), Float64(abs(sin(Float64(y * 30.0))) - 0.2));
	else
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(Float64(fma(-4500.0, Float64(y * y), 30.0) * y)) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[z, -3.9e+26], N[Max[N[(-30.0 * z), $MachinePrecision], N[(N[Abs[N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(N[(-4500.0 * N[(y * y), $MachinePrecision] + 30.0), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot z, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9e26

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in z around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{z}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites16.8%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot z}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]

    if -3.9e26 < z

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|y \cdot \left(30 + \color{blue}{-4500 \cdot {y}^{2}}\right)\right| - \frac{1}{5}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(-4500 \cdot {y}^{2} + 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, {y}^{2}, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      6. lift-*.f6427.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
    13. Applied rewrites27.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 38.7% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -3.9e+34)
   (fmax (* -30.0 y) (- (fabs (sin (* y 30.0))) 0.2))
   (fmax
    (- (* (+ (/ 25.0 x) 30.0) x))
    (- (fabs (* (fma -4500.0 (* y y) 30.0) y)) 0.2))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -3.9e+34) {
		tmp = fmax((-30.0 * y), (fabs(sin((y * 30.0))) - 0.2));
	} else {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs((fma(-4500.0, (y * y), 30.0) * y)) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (y <= -3.9e+34)
		tmp = fmax(Float64(-30.0 * y), Float64(abs(sin(Float64(y * 30.0))) - 0.2));
	else
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(Float64(fma(-4500.0, Float64(y * y), 30.0) * y)) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[y, -3.9e+34], N[Max[N[(-30.0 * y), $MachinePrecision], N[(N[Abs[N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(N[(-4500.0 * N[(y * y), $MachinePrecision] + 30.0), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot y, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.90000000000000019e34

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in y around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot y}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. lower-*.f6417.4

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{y}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.4%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot y}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]

    if -3.90000000000000019e34 < y

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|y \cdot \left(30 + \color{blue}{-4500 \cdot {y}^{2}}\right)\right| - \frac{1}{5}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(-4500 \cdot {y}^{2} + 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, {y}^{2}, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      6. lift-*.f6427.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
    13. Applied rewrites27.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 30.3% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -7e+70)
   (fmax (* -30.0 x) (- (fabs (sin (* y 30.0))) 0.2))
   (fmax
    (- (* (+ (/ 25.0 x) 30.0) x))
    (- (fabs (* (fma -4500.0 (* y y) 30.0) y)) 0.2))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -7e+70) {
		tmp = fmax((-30.0 * x), (fabs(sin((y * 30.0))) - 0.2));
	} else {
		tmp = fmax(-(((25.0 / x) + 30.0) * x), (fabs((fma(-4500.0, (y * y), 30.0) * y)) - 0.2));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (x <= -7e+70)
		tmp = fmax(Float64(-30.0 * x), Float64(abs(sin(Float64(y * 30.0))) - 0.2));
	else
		tmp = fmax(Float64(-Float64(Float64(Float64(25.0 / x) + 30.0) * x)), Float64(abs(Float64(fma(-4500.0, Float64(y * y), 30.0) * y)) - 0.2));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[x, -7e+70], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[(-N[(N[(N[(25.0 / x), $MachinePrecision] + 30.0), $MachinePrecision] * x), $MachinePrecision]), N[(N[Abs[N[(N[(-4500.0 * N[(y * y), $MachinePrecision] + 30.0), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.00000000000000005e70

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

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

        \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites17.6%

      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]

    if -7.00000000000000005e70 < x

    1. Initial program 46.6%

      \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
    3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
      11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
      13. lift-*.f6446.3

        \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
    4. Applied rewrites46.3%

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
    5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
    6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      3. lift-*.f6445.9

        \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    7. Applied rewrites45.9%

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
    8. Taylor expanded in x around -inf

      \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      6. lower-+.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      7. mult-flip-revN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
      8. lower-/.f6429.1

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
    10. Applied rewrites29.1%

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

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|y \cdot \left(30 + \color{blue}{-4500 \cdot {y}^{2}}\right)\right| - \frac{1}{5}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(-4500 \cdot {y}^{2} + 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, {y}^{2}, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
      6. lift-*.f6427.5

        \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
    13. Applied rewrites27.5%

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 27.5% accurate, 10.4× speedup?

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

\\
\mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)
\end{array}
Derivation
  1. Initial program 46.6%

    \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
  3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
    12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
    13. lift-*.f6446.3

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
  4. Applied rewrites46.3%

    \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
  5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
  6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    3. lift-*.f6445.9

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
  7. Applied rewrites45.9%

    \[\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(y \cdot 30\right)\right| - 0.2\right) \]
  8. Taylor expanded in x around -inf

    \[\leadsto \mathsf{max}\left(\color{blue}{-1 \cdot \left(x \cdot \left(30 + 25 \cdot \frac{1}{x}\right)\right)}, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
  9. Step-by-step derivation
    1. mul-1-negN/A

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

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

      \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    4. lower-*.f64N/A

      \[\leadsto \mathsf{max}\left(-\left(30 + 25 \cdot \frac{1}{x}\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    5. +-commutativeN/A

      \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    6. lower-+.f64N/A

      \[\leadsto \mathsf{max}\left(-\left(25 \cdot \frac{1}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    7. mult-flip-revN/A

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    8. lower-/.f6429.1

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
  10. Applied rewrites29.1%

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

    \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|y \cdot \left(30 + \color{blue}{-4500 \cdot {y}^{2}}\right)\right| - \frac{1}{5}\right) \]
  12. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
    2. lower-*.f64N/A

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
    3. +-commutativeN/A

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\left(-4500 \cdot {y}^{2} + 30\right) \cdot y\right| - \frac{1}{5}\right) \]
    4. lower-fma.f64N/A

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, {y}^{2}, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
    5. pow2N/A

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
    6. lift-*.f6427.5

      \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  13. Applied rewrites27.5%

    \[\leadsto \mathsf{max}\left(-\left(\frac{25}{x} + 30\right) \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  14. Add Preprocessing

Alternative 14: 15.9% accurate, 13.7× speedup?

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

\\
\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right)
\end{array}
Derivation
  1. Initial program 46.6%

    \[\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. Taylor expanded in z 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 y\right) + \cos \left(30 \cdot y\right) \cdot \sin \left(30 \cdot x\right)}\right| - \frac{1}{5}\right) \]
  3. 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 y\right) \cdot \sin \left(30 \cdot x\right) + \color{blue}{\sin \left(30 \cdot y\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 x\right) \cdot \cos \left(30 \cdot y\right) + \sin \color{blue}{\left(30 \cdot y\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 x\right), \color{blue}{\cos \left(30 \cdot y\right)}, \sin \left(30 \cdot y\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(x \cdot 30\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    5. lift-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(x \cdot 30\right), \cos \color{blue}{\left(30 \cdot y\right)}, \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\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 x\right), \cos \left(\color{blue}{30} \cdot y\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    8. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    9. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    10. lift-*.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 x\right), \cos \left(y \cdot 30\right), \sin \left(30 \cdot y\right)\right)\right| - \frac{1}{5}\right) \]
    11. *-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
    12. lift-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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - \frac{1}{5}\right) \]
    13. lift-*.f6446.3

      \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)\right| - 0.2\right) \]
  4. Applied rewrites46.3%

    \[\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 x\right), \cos \left(y \cdot 30\right), \sin \left(y \cdot 30\right)\right)}\right| - 0.2\right) \]
  5. 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|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
  6. 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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    2. lift-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|\sin \left(y \cdot 30\right)\right| - \frac{1}{5}\right) \]
    3. lift-*.f6445.9

      \[\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(y \cdot 30\right)\right| - 0.2\right) \]
  7. Applied rewrites45.9%

    \[\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(y \cdot 30\right)\right| - 0.2\right) \]
  8. Taylor expanded in x around -inf

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

      \[\leadsto \mathsf{max}\left(-30 \cdot \color{blue}{x}, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right) \]
  10. Applied rewrites17.6%

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

    \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|y \cdot \left(30 + \color{blue}{-4500 \cdot {y}^{2}}\right)\right| - \frac{1}{5}\right) \]
  12. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
    2. lower-*.f64N/A

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\left(30 + -4500 \cdot {y}^{2}\right) \cdot y\right| - \frac{1}{5}\right) \]
    3. +-commutativeN/A

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\left(-4500 \cdot {y}^{2} + 30\right) \cdot y\right| - \frac{1}{5}\right) \]
    4. lower-fma.f64N/A

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(-4500, {y}^{2}, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
    5. pow2N/A

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - \frac{1}{5}\right) \]
    6. lift-*.f6415.9

      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  13. Applied rewrites15.9%

    \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(-4500, y \cdot y, 30\right) \cdot y\right| - 0.2\right) \]
  14. Add Preprocessing

Reproduce

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