Gyroid sphere

Percentage Accurate: 46.2% → 90.3%
Time: 6.3s
Alternatives: 12
Speedup: 4.7×

Specification

?
\[\begin{array}{l} \\ \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (fmax
  (-
   (sqrt
    (+ (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0)) (pow (* z 30.0) 2.0)))
   25.0)
  (-
   (fabs
    (+
     (+
      (* (sin (* x 30.0)) (cos (* y 30.0)))
      (* (sin (* y 30.0)) (cos (* z 30.0))))
     (* (sin (* z 30.0)) (cos (* x 30.0)))))
   0.2)))
double code(double x, double y, double z) {
	return fmax((sqrt(((pow((x * 30.0), 2.0) + pow((y * 30.0), 2.0)) + pow((z * 30.0), 2.0))) - 25.0), (fabs((((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))) + (sin((z * 30.0)) * cos((x * 30.0))))) - 0.2));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 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.2% 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: 90.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+97}:\\
\;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|t\_3 \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot t\_2 + t\_1 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.30000000000000011e33

    1. Initial program 43.1%

      \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
    2. Add Preprocessing
    3. Taylor expanded in 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) \]
    4. Step-by-step derivation
      1. Applied rewrites43.1%

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

          \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
        2. lift-+.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
        3. lift-*.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left({\color{blue}{\left(x \cdot 30\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) \]
        4. lift-pow.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(\color{blue}{{\left(x \cdot 30\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) \]
        5. lift-*.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\color{blue}{\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) \]
        6. lift-pow.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + \color{blue}{{\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) \]
        7. lift-*.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\color{blue}{\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) \]
        8. lift-pow.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + \color{blue}{{\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) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{{\left(z \cdot 30\right)}^{2} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)}} - 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) \]
        10. unpow2N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right)} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)} - 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) \]
        11. unpow-prod-downN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{{x}^{2} \cdot {30}^{2}} + {\left(y \cdot 30\right)}^{2}\right)} - 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. metadata-evalN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot \color{blue}{900} + {\left(y \cdot 30\right)}^{2}\right)} - 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. unpow-prod-downN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{{y}^{2} \cdot {30}^{2}}\right)} - 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) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + {y}^{2} \cdot \color{blue}{900}\right)} - 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) \]
        15. *-commutativeN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{900 \cdot {y}^{2}}\right)} - 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) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{900 \cdot {x}^{2}} + 900 \cdot {y}^{2}\right)} - 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) \]
        17. lower-fma.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)}} - 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) \]
        18. lift-*.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(\color{blue}{z \cdot 30}, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
        19. lift-*.f64N/A

          \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, \color{blue}{z \cdot 30}, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
      3. Applied rewrites43.1%

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

        \[\leadsto \mathsf{max}\left(\color{blue}{30 \cdot \sqrt{{x}^{2} + {y}^{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) \]
      5. Step-by-step derivation
        1. Applied rewrites92.2%

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

        if -2.30000000000000011e33 < y < 1.4e97

        1. Initial program 51.1%

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

          \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {z}^{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| - \frac{1}{5}\right) \]
        4. Step-by-step derivation
          1. Applied rewrites95.2%

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

          if 1.4e97 < y

          1. Initial program 17.7%

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

            \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {y}^{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| - \frac{1}{5}\right) \]
          4. Step-by-step derivation
            1. Applied rewrites93.8%

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

              \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
            3. Step-by-step derivation
              1. Applied rewrites93.8%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y, x\right) \cdot 30 - 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)\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \]
            6. Add Preprocessing

            Alternative 2: 70.9% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(30 \cdot x\right)\\ t_1 := \sin \left(y \cdot 30\right)\\ t_2 := \cos \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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot t\_2 + t\_1 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right) \leq 10^{+154}:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)} - 25, \left|\mathsf{fma}\left(t\_0, t\_2, t\_1\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, t\_0\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (let* ((t_0 (sin (* 30.0 x))) (t_1 (sin (* y 30.0))) (t_2 (cos (* 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 (* z 30.0)) (cos (* x 30.0)))
                        (+ (* (sin (* x 30.0)) t_2) (* t_1 (cos (* z 30.0))))))
                      0.2))
                    1e+154)
                 (fmax
                  (- (sqrt (fma (* z 30.0) (* z 30.0) (* 900.0 (fma x x (* y y))))) 25.0)
                  (- (fabs (fma t_0 t_2 t_1)) 0.2))
                 (fmax (* -30.0 x) (- (fabs (fma (* z 30.0) 1.0 t_0)) 0.2)))))
            double code(double x, double y, double z) {
            	double t_0 = sin((30.0 * x));
            	double t_1 = sin((y * 30.0));
            	double t_2 = cos((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((z * 30.0)) * cos((x * 30.0))) + ((sin((x * 30.0)) * t_2) + (t_1 * cos((z * 30.0)))))) - 0.2)) <= 1e+154) {
            		tmp = fmax((sqrt(fma((z * 30.0), (z * 30.0), (900.0 * fma(x, x, (y * y))))) - 25.0), (fabs(fma(t_0, t_2, t_1)) - 0.2));
            	} else {
            		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), 1.0, t_0)) - 0.2));
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	t_0 = sin(Float64(30.0 * x))
            	t_1 = sin(Float64(y * 30.0))
            	t_2 = cos(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(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))) + Float64(Float64(sin(Float64(x * 30.0)) * t_2) + Float64(t_1 * cos(Float64(z * 30.0)))))) - 0.2)) <= 1e+154)
            		tmp = fmax(Float64(sqrt(fma(Float64(z * 30.0), Float64(z * 30.0), Float64(900.0 * fma(x, x, Float64(y * y))))) - 25.0), Float64(abs(fma(t_0, t_2, t_1)) - 0.2));
            	else
            		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), 1.0, t_0)) - 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[Sin[N[(y * 30.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[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[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sin[N[(x * 30.0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$1 * N[Cos[N[(z * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 1e+154], N[Max[N[(N[Sqrt[N[(N[(z * 30.0), $MachinePrecision] * N[(z * 30.0), $MachinePrecision] + N[(900.0 * N[(x * x + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(t$95$0 * t$95$2 + t$95$1), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(N[(z * 30.0), $MachinePrecision] * 1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \sin \left(30 \cdot x\right)\\
            t_1 := \sin \left(y \cdot 30\right)\\
            t_2 := \cos \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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot t\_2 + t\_1 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right) \leq 10^{+154}:\\
            \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)} - 25, \left|\mathsf{fma}\left(t\_0, t\_2, t\_1\right)\right| - 0.2\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, t\_0\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))) < 1.00000000000000004e154

              1. Initial program 99.9%

                \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
              2. Add Preprocessing
              3. Taylor expanded in 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) \]
              4. Step-by-step derivation
                1. Applied rewrites98.1%

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

                    \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
                  2. lift-+.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
                  3. lift-*.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left({\color{blue}{\left(x \cdot 30\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) \]
                  4. lift-pow.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(\color{blue}{{\left(x \cdot 30\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) \]
                  5. lift-*.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\color{blue}{\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) \]
                  6. lift-pow.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + \color{blue}{{\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) \]
                  7. lift-*.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\color{blue}{\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) \]
                  8. lift-pow.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + \color{blue}{{\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) \]
                  9. +-commutativeN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{{\left(z \cdot 30\right)}^{2} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)}} - 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) \]
                  10. unpow2N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right)} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)} - 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) \]
                  11. unpow-prod-downN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{{x}^{2} \cdot {30}^{2}} + {\left(y \cdot 30\right)}^{2}\right)} - 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. metadata-evalN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot \color{blue}{900} + {\left(y \cdot 30\right)}^{2}\right)} - 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. unpow-prod-downN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{{y}^{2} \cdot {30}^{2}}\right)} - 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) \]
                  14. metadata-evalN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + {y}^{2} \cdot \color{blue}{900}\right)} - 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) \]
                  15. *-commutativeN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{900 \cdot {y}^{2}}\right)} - 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) \]
                  16. *-commutativeN/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{900 \cdot {x}^{2}} + 900 \cdot {y}^{2}\right)} - 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) \]
                  17. lower-fma.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)}} - 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) \]
                  18. lift-*.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(\color{blue}{z \cdot 30}, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
                  19. lift-*.f64N/A

                    \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, \color{blue}{z \cdot 30}, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
                3. Applied rewrites98.0%

                  \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)}} - 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) \]

                if 1.00000000000000004e154 < (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 9.0%

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

                  \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                  1. Applied rewrites21.8%

                    \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

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

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

                      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites38.6%

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

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

                          \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification68.6%

                        \[\leadsto \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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right) \leq 10^{+154}:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)} - 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)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 3: 70.6% 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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right) \leq 10^{+154}:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)} - 25, \left|t\_0\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \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 (* z 30.0)) (cos (* x 30.0)))
                                  (+
                                   (* (sin (* x 30.0)) (cos (* y 30.0)))
                                   (* t_0 (cos (* z 30.0))))))
                                0.2))
                              1e+154)
                           (fmax
                            (- (sqrt (fma (* z 30.0) (* z 30.0) (* 900.0 (fma x x (* y y))))) 25.0)
                            (- (fabs t_0) 0.2))
                           (fmax (* -30.0 x) (- (fabs (fma (* z 30.0) 1.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((z * 30.0)) * cos((x * 30.0))) + ((sin((x * 30.0)) * cos((y * 30.0))) + (t_0 * cos((z * 30.0)))))) - 0.2)) <= 1e+154) {
                      		tmp = fmax((sqrt(fma((z * 30.0), (z * 30.0), (900.0 * fma(x, x, (y * y))))) - 25.0), (fabs(t_0) - 0.2));
                      	} else {
                      		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), 1.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(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))) + Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(t_0 * cos(Float64(z * 30.0)))))) - 0.2)) <= 1e+154)
                      		tmp = fmax(Float64(sqrt(fma(Float64(z * 30.0), Float64(z * 30.0), Float64(900.0 * fma(x, x, Float64(y * y))))) - 25.0), Float64(abs(t_0) - 0.2));
                      	else
                      		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), 1.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[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 1e+154], N[Max[N[(N[Sqrt[N[(N[(z * 30.0), $MachinePrecision] * N[(z * 30.0), $MachinePrecision] + N[(900.0 * N[(x * x + N[(y * y), $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[(N[(z * 30.0), $MachinePrecision] * 1.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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right) \leq 10^{+154}:\\
                      \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)} - 25, \left|t\_0\right| - 0.2\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \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))) < 1.00000000000000004e154

                        1. Initial program 99.9%

                          \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in 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) \]
                        4. Step-by-step derivation
                          1. Applied rewrites98.1%

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

                              \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
                            2. lift-+.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
                            3. lift-*.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left({\color{blue}{\left(x \cdot 30\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) \]
                            4. lift-pow.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(\color{blue}{{\left(x \cdot 30\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) \]
                            5. lift-*.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\color{blue}{\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) \]
                            6. lift-pow.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + \color{blue}{{\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) \]
                            7. lift-*.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\color{blue}{\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) \]
                            8. lift-pow.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + \color{blue}{{\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) \]
                            9. +-commutativeN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{{\left(z \cdot 30\right)}^{2} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)}} - 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) \]
                            10. unpow2N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right)} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)} - 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) \]
                            11. unpow-prod-downN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{{x}^{2} \cdot {30}^{2}} + {\left(y \cdot 30\right)}^{2}\right)} - 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. metadata-evalN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot \color{blue}{900} + {\left(y \cdot 30\right)}^{2}\right)} - 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. unpow-prod-downN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{{y}^{2} \cdot {30}^{2}}\right)} - 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) \]
                            14. metadata-evalN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + {y}^{2} \cdot \color{blue}{900}\right)} - 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) \]
                            15. *-commutativeN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{900 \cdot {y}^{2}}\right)} - 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) \]
                            16. *-commutativeN/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{900 \cdot {x}^{2}} + 900 \cdot {y}^{2}\right)} - 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) \]
                            17. lower-fma.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)}} - 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) \]
                            18. lift-*.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(\color{blue}{z \cdot 30}, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
                            19. lift-*.f64N/A

                              \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, \color{blue}{z \cdot 30}, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
                          3. Applied rewrites98.0%

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

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

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

                            if 1.00000000000000004e154 < (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 9.0%

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

                              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                              1. Applied rewrites21.8%

                                \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

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

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

                                  \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites38.6%

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

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

                                      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right) \]
                                  4. Recombined 2 regimes into one program.
                                  5. Final simplification68.3%

                                    \[\leadsto \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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right) \leq 10^{+154}:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot \mathsf{fma}\left(x, x, y \cdot y\right)\right)} - 25, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 4: 61.2% 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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right) \leq 20:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|t\_0\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\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 (* z 30.0)) (cos (* x 30.0)))
                                              (+
                                               (* (sin (* x 30.0)) (cos (* y 30.0)))
                                               (* t_0 (cos (* z 30.0))))))
                                            0.2))
                                          20.0)
                                       (fmax (- (sqrt (* (* y y) 900.0)) 25.0) (- (fabs t_0) 0.2))
                                       (fmax
                                        (* -30.0 x)
                                        (- (fabs (fma (* z 30.0) (cos (* 30.0 x)) (* 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((z * 30.0)) * cos((x * 30.0))) + ((sin((x * 30.0)) * cos((y * 30.0))) + (t_0 * cos((z * 30.0)))))) - 0.2)) <= 20.0) {
                                  		tmp = fmax((sqrt(((y * y) * 900.0)) - 25.0), (fabs(t_0) - 0.2));
                                  	} else {
                                  		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), cos((30.0 * x)), (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(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))) + Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(t_0 * cos(Float64(z * 30.0)))))) - 0.2)) <= 20.0)
                                  		tmp = fmax(Float64(sqrt(Float64(Float64(y * y) * 900.0)) - 25.0), Float64(abs(t_0) - 0.2));
                                  	else
                                  		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), cos(Float64(30.0 * x)), 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[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 20.0], N[Max[N[(N[Sqrt[N[(N[(y * y), $MachinePrecision] * 900.0), $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[(N[(z * 30.0), $MachinePrecision] * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + N[(30.0 * x), $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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + t\_0 \cdot \cos \left(z \cdot 30\right)\right)\right| - 0.2\right) \leq 20:\\
                                  \;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|t\_0\right| - 0.2\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\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))) < 20

                                    1. Initial program 99.7%

                                      \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in 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) \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites92.7%

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

                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{900 \cdot {y}^{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) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites92.7%

                                          \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left(y \cdot y\right) \cdot 900}} - 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) \]
                                        2. Taylor expanded in x around 0

                                          \[\leadsto \mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|\sin \left(30 \cdot y\right)\right| - \frac{1}{5}\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites90.2%

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

                                          if 20 < (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 37.4%

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

                                            \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                            1. Applied rewrites22.1%

                                              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                              \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites21.8%

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

                                                \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites40.6%

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

                                                  \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\right)\right| - \frac{1}{5}\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites51.9%

                                                    \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\right)\right| - 0.2\right) \]
                                                4. Recombined 2 regimes into one program.
                                                5. Final simplification55.6%

                                                  \[\leadsto \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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right) \leq 20:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|\sin \left(y \cdot 30\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\right)\right| - 0.2\right)\\ \end{array} \]
                                                6. Add Preprocessing

                                                Alternative 5: 61.1% 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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right) \leq 20:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|\sin \left(30 \cdot x\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\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 (* z 30.0)) (cos (* x 30.0)))
                                                          (+
                                                           (* (sin (* x 30.0)) (cos (* y 30.0)))
                                                           (* (sin (* y 30.0)) (cos (* z 30.0))))))
                                                        0.2))
                                                      20.0)
                                                   (fmax (- (sqrt (* (* y y) 900.0)) 25.0) (- (fabs (sin (* 30.0 x))) 0.2))
                                                   (fmax
                                                    (* -30.0 x)
                                                    (- (fabs (fma (* z 30.0) (cos (* 30.0 x)) (* 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((z * 30.0)) * cos((x * 30.0))) + ((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))))) - 0.2)) <= 20.0) {
                                                		tmp = fmax((sqrt(((y * y) * 900.0)) - 25.0), (fabs(sin((30.0 * x))) - 0.2));
                                                	} else {
                                                		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), cos((30.0 * x)), (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(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0))) + Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))))) - 0.2)) <= 20.0)
                                                		tmp = fmax(Float64(sqrt(Float64(Float64(y * y) * 900.0)) - 25.0), Float64(abs(sin(Float64(30.0 * x))) - 0.2));
                                                	else
                                                		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), cos(Float64(30.0 * x)), 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[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], 20.0], N[Max[N[(N[Sqrt[N[(N[(y * y), $MachinePrecision] * 900.0), $MachinePrecision]], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(N[(z * 30.0), $MachinePrecision] * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + N[(30.0 * x), $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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right) \leq 20:\\
                                                \;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|\sin \left(30 \cdot x\right)\right| - 0.2\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\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))) < 20

                                                  1. Initial program 99.7%

                                                    \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in 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) \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites92.7%

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

                                                      \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{900 \cdot {y}^{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) \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites92.7%

                                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left(y \cdot y\right) \cdot 900}} - 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) \]
                                                      2. Taylor expanded in y around 0

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

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

                                                        if 20 < (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 37.4%

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

                                                          \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                          1. Applied rewrites22.1%

                                                            \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                            \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites21.8%

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

                                                              \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites40.6%

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

                                                                \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\right)\right| - \frac{1}{5}\right) \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites51.9%

                                                                  \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\right)\right| - 0.2\right) \]
                                                              4. Recombined 2 regimes into one program.
                                                              5. Final simplification55.5%

                                                                \[\leadsto \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|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right) \leq 20:\\ \;\;\;\;\mathsf{max}\left(\sqrt{\left(y \cdot y\right) \cdot 900} - 25, \left|\sin \left(30 \cdot x\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, \cos \left(30 \cdot x\right), 30 \cdot x\right)\right| - 0.2\right)\\ \end{array} \]
                                                              6. Add Preprocessing

                                                              Alternative 6: 90.0% accurate, 1.2× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{+30} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|t\_0 + \sin \left(30 \cdot x\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|t\_0 + \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)\right| - 0.2\right)\\ \end{array} \end{array} \]
                                                              (FPCore (x y z)
                                                               :precision binary64
                                                               (let* ((t_0 (* (sin (* z 30.0)) (cos (* x 30.0)))))
                                                                 (if (or (<= z -1.15e+30) (not (<= z 1.3e+69)))
                                                                   (fmax
                                                                    (- (hypot (* z 30.0) (* 30.0 x)) 25.0)
                                                                    (- (fabs (+ t_0 (sin (* 30.0 x)))) 0.2))
                                                                   (fmax
                                                                    (- (hypot (* y 30.0) (* 30.0 x)) 25.0)
                                                                    (-
                                                                     (fabs
                                                                      (+
                                                                       t_0
                                                                       (+
                                                                        (* (sin (* x 30.0)) (cos (* y 30.0)))
                                                                        (* (sin (* y 30.0)) (cos (* z 30.0))))))
                                                                     0.2)))))
                                                              double code(double x, double y, double z) {
                                                              	double t_0 = sin((z * 30.0)) * cos((x * 30.0));
                                                              	double tmp;
                                                              	if ((z <= -1.15e+30) || !(z <= 1.3e+69)) {
                                                              		tmp = fmax((hypot((z * 30.0), (30.0 * x)) - 25.0), (fabs((t_0 + sin((30.0 * x)))) - 0.2));
                                                              	} else {
                                                              		tmp = fmax((hypot((y * 30.0), (30.0 * x)) - 25.0), (fabs((t_0 + ((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))))) - 0.2));
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              public static double code(double x, double y, double z) {
                                                              	double t_0 = Math.sin((z * 30.0)) * Math.cos((x * 30.0));
                                                              	double tmp;
                                                              	if ((z <= -1.15e+30) || !(z <= 1.3e+69)) {
                                                              		tmp = fmax((Math.hypot((z * 30.0), (30.0 * x)) - 25.0), (Math.abs((t_0 + Math.sin((30.0 * x)))) - 0.2));
                                                              	} else {
                                                              		tmp = fmax((Math.hypot((y * 30.0), (30.0 * x)) - 25.0), (Math.abs((t_0 + ((Math.sin((x * 30.0)) * Math.cos((y * 30.0))) + (Math.sin((y * 30.0)) * Math.cos((z * 30.0)))))) - 0.2));
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(x, y, z):
                                                              	t_0 = math.sin((z * 30.0)) * math.cos((x * 30.0))
                                                              	tmp = 0
                                                              	if (z <= -1.15e+30) or not (z <= 1.3e+69):
                                                              		tmp = fmax((math.hypot((z * 30.0), (30.0 * x)) - 25.0), (math.fabs((t_0 + math.sin((30.0 * x)))) - 0.2))
                                                              	else:
                                                              		tmp = fmax((math.hypot((y * 30.0), (30.0 * x)) - 25.0), (math.fabs((t_0 + ((math.sin((x * 30.0)) * math.cos((y * 30.0))) + (math.sin((y * 30.0)) * math.cos((z * 30.0)))))) - 0.2))
                                                              	return tmp
                                                              
                                                              function code(x, y, z)
                                                              	t_0 = Float64(sin(Float64(z * 30.0)) * cos(Float64(x * 30.0)))
                                                              	tmp = 0.0
                                                              	if ((z <= -1.15e+30) || !(z <= 1.3e+69))
                                                              		tmp = fmax(Float64(hypot(Float64(z * 30.0), Float64(30.0 * x)) - 25.0), Float64(abs(Float64(t_0 + sin(Float64(30.0 * x)))) - 0.2));
                                                              	else
                                                              		tmp = fmax(Float64(hypot(Float64(y * 30.0), Float64(30.0 * x)) - 25.0), Float64(abs(Float64(t_0 + Float64(Float64(sin(Float64(x * 30.0)) * cos(Float64(y * 30.0))) + Float64(sin(Float64(y * 30.0)) * cos(Float64(z * 30.0)))))) - 0.2));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(x, y, z)
                                                              	t_0 = sin((z * 30.0)) * cos((x * 30.0));
                                                              	tmp = 0.0;
                                                              	if ((z <= -1.15e+30) || ~((z <= 1.3e+69)))
                                                              		tmp = max((hypot((z * 30.0), (30.0 * x)) - 25.0), (abs((t_0 + sin((30.0 * x)))) - 0.2));
                                                              	else
                                                              		tmp = max((hypot((y * 30.0), (30.0 * x)) - 25.0), (abs((t_0 + ((sin((x * 30.0)) * cos((y * 30.0))) + (sin((y * 30.0)) * cos((z * 30.0)))))) - 0.2));
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(x * 30.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.15e+30], N[Not[LessEqual[z, 1.3e+69]], $MachinePrecision]], N[Max[N[(N[Sqrt[N[(z * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(t$95$0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[Sqrt[N[(y * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(t$95$0 + N[(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]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              t_0 := \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\\
                                                              \mathbf{if}\;z \leq -1.15 \cdot 10^{+30} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\
                                                              \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|t\_0 + \sin \left(30 \cdot x\right)\right| - 0.2\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|t\_0 + \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)\right| - 0.2\right)\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if z < -1.15e30 or 1.3000000000000001e69 < z

                                                                1. Initial program 32.1%

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

                                                                  \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {z}^{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| - \frac{1}{5}\right) \]
                                                                4. Step-by-step derivation
                                                                  1. Applied rewrites89.9%

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

                                                                    \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\sin \left(30 \cdot x\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. Applied rewrites89.9%

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

                                                                    if -1.15e30 < z < 1.3000000000000001e69

                                                                    1. Initial program 50.9%

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

                                                                      \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {y}^{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| - \frac{1}{5}\right) \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites97.0%

                                                                        \[\leadsto \mathsf{max}\left(\color{blue}{\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right)} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
                                                                    5. Recombined 2 regimes into one program.
                                                                    6. Final simplification94.2%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+30} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \sin \left(30 \cdot x\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \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)\right| - 0.2\right)\\ \end{array} \]
                                                                    7. Add Preprocessing

                                                                    Alternative 7: 89.6% accurate, 2.0× speedup?

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

                                                                      1. Initial program 32.1%

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

                                                                        \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {z}^{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| - \frac{1}{5}\right) \]
                                                                      4. Step-by-step derivation
                                                                        1. Applied rewrites89.9%

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

                                                                          \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\sin \left(30 \cdot x\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. Applied rewrites89.9%

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

                                                                          if -1.15e30 < z < 1.3000000000000001e69

                                                                          1. Initial program 50.9%

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

                                                                            \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {y}^{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| - \frac{1}{5}\right) \]
                                                                          4. Step-by-step derivation
                                                                            1. Applied rewrites97.0%

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

                                                                              \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites96.3%

                                                                                \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)}\right| - 0.2\right) \]
                                                                            4. Recombined 2 regimes into one program.
                                                                            5. Final simplification93.8%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+30} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(z \cdot 30, 30 \cdot x\right) - 25, \left|\sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right) + \sin \left(30 \cdot x\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \]
                                                                            6. Add Preprocessing

                                                                            Alternative 8: 86.5% accurate, 2.0× speedup?

                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(30 \cdot x\right)\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+102} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, t\_0\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), t\_0\right)\right| - 0.2\right)\\ \end{array} \end{array} \]
                                                                            (FPCore (x y z)
                                                                             :precision binary64
                                                                             (let* ((t_0 (sin (* 30.0 x))))
                                                                               (if (or (<= z -1.4e+102) (not (<= z 1.3e+69)))
                                                                                 (fmax (* -30.0 x) (- (fabs (fma (* z 30.0) 1.0 t_0)) 0.2))
                                                                                 (fmax
                                                                                  (- (hypot (* y 30.0) (* 30.0 x)) 25.0)
                                                                                  (- (fabs (fma (sin (* z 30.0)) (cos (* 30.0 x)) t_0)) 0.2)))))
                                                                            double code(double x, double y, double z) {
                                                                            	double t_0 = sin((30.0 * x));
                                                                            	double tmp;
                                                                            	if ((z <= -1.4e+102) || !(z <= 1.3e+69)) {
                                                                            		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), 1.0, t_0)) - 0.2));
                                                                            	} else {
                                                                            		tmp = fmax((hypot((y * 30.0), (30.0 * x)) - 25.0), (fabs(fma(sin((z * 30.0)), cos((30.0 * x)), t_0)) - 0.2));
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            function code(x, y, z)
                                                                            	t_0 = sin(Float64(30.0 * x))
                                                                            	tmp = 0.0
                                                                            	if ((z <= -1.4e+102) || !(z <= 1.3e+69))
                                                                            		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), 1.0, t_0)) - 0.2));
                                                                            	else
                                                                            		tmp = fmax(Float64(hypot(Float64(y * 30.0), Float64(30.0 * x)) - 25.0), Float64(abs(fma(sin(Float64(z * 30.0)), cos(Float64(30.0 * x)), t_0)) - 0.2));
                                                                            	end
                                                                            	return tmp
                                                                            end
                                                                            
                                                                            code[x_, y_, z_] := Block[{t$95$0 = N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[z, -1.4e+102], N[Not[LessEqual[z, 1.3e+69]], $MachinePrecision]], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(N[(z * 30.0), $MachinePrecision] * 1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[Sqrt[N[(y * 30.0), $MachinePrecision] ^ 2 + N[(30.0 * x), $MachinePrecision] ^ 2], $MachinePrecision] - 25.0), $MachinePrecision], N[(N[Abs[N[(N[Sin[N[(z * 30.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] + t$95$0), $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.4 \cdot 10^{+102} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\
                                                                            \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, t\_0\right)\right| - 0.2\right)\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), t\_0\right)\right| - 0.2\right)\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if z < -1.40000000000000009e102 or 1.3000000000000001e69 < z

                                                                              1. Initial program 28.0%

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

                                                                                \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                                                1. Applied rewrites16.4%

                                                                                  \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                                                  \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites16.5%

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

                                                                                    \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites58.0%

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

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

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

                                                                                      if -1.40000000000000009e102 < z < 1.3000000000000001e69

                                                                                      1. Initial program 52.4%

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

                                                                                        \[\leadsto \mathsf{max}\left(\color{blue}{\sqrt{900 \cdot {x}^{2} + 900 \cdot {y}^{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| - \frac{1}{5}\right) \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites95.7%

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

                                                                                          \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites95.1%

                                                                                            \[\leadsto \mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\color{blue}{\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)}\right| - 0.2\right) \]
                                                                                        4. Recombined 2 regimes into one program.
                                                                                        5. Final simplification90.5%

                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+102} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y \cdot 30, 30 \cdot x\right) - 25, \left|\mathsf{fma}\left(\sin \left(z \cdot 30\right), \cos \left(30 \cdot x\right), \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \end{array} \]
                                                                                        6. Add Preprocessing

                                                                                        Alternative 9: 86.4% accurate, 2.0× speedup?

                                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(30 \cdot x\right)\\ \mathbf{if}\;z \leq -9.8 \cdot 10^{+101} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, t\_0\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y, x\right) \cdot 30 - 25, \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 (or (<= z -9.8e+101) (not (<= z 1.3e+69)))
                                                                                             (fmax (* -30.0 x) (- (fabs (fma (* z 30.0) 1.0 t_0)) 0.2))
                                                                                             (fmax
                                                                                              (- (* (hypot y x) 30.0) 25.0)
                                                                                              (- (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 <= -9.8e+101) || !(z <= 1.3e+69)) {
                                                                                        		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), 1.0, t_0)) - 0.2));
                                                                                        	} else {
                                                                                        		tmp = fmax(((hypot(y, x) * 30.0) - 25.0), (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 <= -9.8e+101) || !(z <= 1.3e+69))
                                                                                        		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), 1.0, t_0)) - 0.2));
                                                                                        	else
                                                                                        		tmp = fmax(Float64(Float64(hypot(y, x) * 30.0) - 25.0), 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[Or[LessEqual[z, -9.8e+101], N[Not[LessEqual[z, 1.3e+69]], $MachinePrecision]], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(N[(z * 30.0), $MachinePrecision] * 1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(N[(N[Sqrt[y ^ 2 + x ^ 2], $MachinePrecision] * 30.0), $MachinePrecision] - 25.0), $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 -9.8 \cdot 10^{+101} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\
                                                                                        \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, t\_0\right)\right| - 0.2\right)\\
                                                                                        
                                                                                        \mathbf{else}:\\
                                                                                        \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y, x\right) \cdot 30 - 25, \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 2 regimes
                                                                                        2. if z < -9.79999999999999965e101 or 1.3000000000000001e69 < z

                                                                                          1. Initial program 28.0%

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

                                                                                            \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                                                            1. Applied rewrites16.4%

                                                                                              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                                                              \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites16.5%

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

                                                                                                \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites58.0%

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

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

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

                                                                                                  if -9.79999999999999965e101 < z < 1.3000000000000001e69

                                                                                                  1. Initial program 52.4%

                                                                                                    \[\mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\left(z \cdot 30\right)}^{2}} - 25, \left|\left(\sin \left(x \cdot 30\right) \cdot \cos \left(y \cdot 30\right) + \sin \left(y \cdot 30\right) \cdot \cos \left(z \cdot 30\right)\right) + \sin \left(z \cdot 30\right) \cdot \cos \left(x \cdot 30\right)\right| - 0.2\right) \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Taylor expanded in 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) \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites51.4%

                                                                                                      \[\leadsto \mathsf{max}\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) \]
                                                                                                    2. Step-by-step derivation
                                                                                                      1. lift-+.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
                                                                                                      2. lift-+.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left({\left(x \cdot 30\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) \]
                                                                                                      3. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left({\color{blue}{\left(x \cdot 30\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) \]
                                                                                                      4. lift-pow.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(\color{blue}{{\left(x \cdot 30\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) \]
                                                                                                      5. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\color{blue}{\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) \]
                                                                                                      6. lift-pow.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + \color{blue}{{\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) \]
                                                                                                      7. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + {\color{blue}{\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) \]
                                                                                                      8. lift-pow.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right) + \color{blue}{{\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) \]
                                                                                                      9. +-commutativeN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{{\left(z \cdot 30\right)}^{2} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)}} - 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) \]
                                                                                                      10. unpow2N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right)} + \left({\left(x \cdot 30\right)}^{2} + {\left(y \cdot 30\right)}^{2}\right)} - 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) \]
                                                                                                      11. unpow-prod-downN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{{x}^{2} \cdot {30}^{2}} + {\left(y \cdot 30\right)}^{2}\right)} - 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. metadata-evalN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot \color{blue}{900} + {\left(y \cdot 30\right)}^{2}\right)} - 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. unpow-prod-downN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{{y}^{2} \cdot {30}^{2}}\right)} - 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) \]
                                                                                                      14. metadata-evalN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + {y}^{2} \cdot \color{blue}{900}\right)} - 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) \]
                                                                                                      15. *-commutativeN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left({x}^{2} \cdot 900 + \color{blue}{900 \cdot {y}^{2}}\right)} - 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) \]
                                                                                                      16. *-commutativeN/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\left(z \cdot 30\right) \cdot \left(z \cdot 30\right) + \left(\color{blue}{900 \cdot {x}^{2}} + 900 \cdot {y}^{2}\right)} - 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) \]
                                                                                                      17. lower-fma.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\color{blue}{\mathsf{fma}\left(z \cdot 30, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)}} - 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) \]
                                                                                                      18. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(\color{blue}{z \cdot 30}, z \cdot 30, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
                                                                                                      19. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{max}\left(\sqrt{\mathsf{fma}\left(z \cdot 30, \color{blue}{z \cdot 30}, 900 \cdot {x}^{2} + 900 \cdot {y}^{2}\right)} - 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) \]
                                                                                                    3. Applied rewrites51.3%

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

                                                                                                      \[\leadsto \mathsf{max}\left(\color{blue}{30 \cdot \sqrt{{x}^{2} + {y}^{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) \]
                                                                                                    5. Step-by-step derivation
                                                                                                      1. Applied rewrites94.4%

                                                                                                        \[\leadsto \mathsf{max}\left(\color{blue}{\mathsf{hypot}\left(y, x\right) \cdot 30} - 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) \]
                                                                                                    6. Recombined 2 regimes into one program.
                                                                                                    7. Final simplification90.0%

                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+101} \lor \neg \left(z \leq 1.3 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(\mathsf{hypot}\left(y, x\right) \cdot 30 - 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)\\ \end{array} \]
                                                                                                    8. Add Preprocessing

                                                                                                    Alternative 10: 52.2% accurate, 4.7× speedup?

                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3.2 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\ \end{array} \end{array} \]
                                                                                                    (FPCore (x y z)
                                                                                                     :precision binary64
                                                                                                     (if (<= x 3.2e+161)
                                                                                                       (fmax (* -30.0 x) (- (fabs (fma (* z 30.0) 1.0 (sin (* 30.0 x)))) 0.2))
                                                                                                       (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2))))
                                                                                                    double code(double x, double y, double z) {
                                                                                                    	double tmp;
                                                                                                    	if (x <= 3.2e+161) {
                                                                                                    		tmp = fmax((-30.0 * x), (fabs(fma((z * 30.0), 1.0, sin((30.0 * x)))) - 0.2));
                                                                                                    	} else {
                                                                                                    		tmp = fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    function code(x, y, z)
                                                                                                    	tmp = 0.0
                                                                                                    	if (x <= 3.2e+161)
                                                                                                    		tmp = fmax(Float64(-30.0 * x), Float64(abs(fma(Float64(z * 30.0), 1.0, sin(Float64(30.0 * x)))) - 0.2));
                                                                                                    	else
                                                                                                    		tmp = fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2));
                                                                                                    	end
                                                                                                    	return tmp
                                                                                                    end
                                                                                                    
                                                                                                    code[x_, y_, z_] := If[LessEqual[x, 3.2e+161], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(N[(z * 30.0), $MachinePrecision] * 1.0 + N[Sin[N[(30.0 * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision], N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    
                                                                                                    \\
                                                                                                    \begin{array}{l}
                                                                                                    \mathbf{if}\;x \leq 3.2 \cdot 10^{+161}:\\
                                                                                                    \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(z \cdot 30, 1, \sin \left(30 \cdot x\right)\right)\right| - 0.2\right)\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;\mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 2 regimes
                                                                                                    2. if x < 3.20000000000000002e161

                                                                                                      1. Initial program 47.4%

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

                                                                                                        \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                                                                        1. Applied rewrites23.1%

                                                                                                          \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                                                                          \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites22.7%

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

                                                                                                            \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30 \cdot z, \cos \color{blue}{\left(30 \cdot x\right)}, \sin \left(30 \cdot x\right)\right)\right| - \frac{1}{5}\right) \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. Applied rewrites41.3%

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

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

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

                                                                                                              if 3.20000000000000002e161 < x

                                                                                                              1. Initial program 13.5%

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

                                                                                                                \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                                                                                1. Applied rewrites3.1%

                                                                                                                  \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                                                                                  \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites3.4%

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

                                                                                                                    \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites3.4%

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

                                                                                                                      \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - \frac{1}{5}\right) \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites73.1%

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

                                                                                                                    Alternative 11: 31.3% accurate, 4.9× speedup?

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

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

                                                                                                                      \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                                                                                      1. Applied rewrites20.8%

                                                                                                                        \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                                                                                        \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites20.5%

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

                                                                                                                          \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot z\right) + \color{blue}{30 \cdot x}\right| - \frac{1}{5}\right) \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. Applied rewrites31.8%

                                                                                                                            \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\mathsf{fma}\left(30, \color{blue}{x}, \sin \left(z \cdot 30\right)\right)\right| - 0.2\right) \]
                                                                                                                          2. Add Preprocessing

                                                                                                                          Alternative 12: 30.8% accurate, 9.4× speedup?

                                                                                                                          \[\begin{array}{l} \\ \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right) \end{array} \]
                                                                                                                          (FPCore (x y z)
                                                                                                                           :precision binary64
                                                                                                                           (fmax (* -30.0 x) (- (fabs (* 30.0 x)) 0.2)))
                                                                                                                          double code(double x, double y, double z) {
                                                                                                                          	return fmax((-30.0 * x), (fabs((30.0 * x)) - 0.2));
                                                                                                                          }
                                                                                                                          
                                                                                                                          module fmin_fmax_functions
                                                                                                                              implicit none
                                                                                                                              private
                                                                                                                              public fmax
                                                                                                                              public fmin
                                                                                                                          
                                                                                                                              interface fmax
                                                                                                                                  module procedure fmax88
                                                                                                                                  module procedure fmax44
                                                                                                                                  module procedure fmax84
                                                                                                                                  module procedure fmax48
                                                                                                                              end interface
                                                                                                                              interface fmin
                                                                                                                                  module procedure fmin88
                                                                                                                                  module procedure fmin44
                                                                                                                                  module procedure fmin84
                                                                                                                                  module procedure fmin48
                                                                                                                              end interface
                                                                                                                          contains
                                                                                                                              real(8) function fmax88(x, y) result (res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(4) function fmax44(x, y) result (res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmax84(x, y) result(res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmax48(x, y) result(res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmin88(x, y) result (res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(4) function fmin44(x, y) result (res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmin84(x, y) result(res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmin48(x, y) result(res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                          end module
                                                                                                                          
                                                                                                                          real(8) function code(x, y, z)
                                                                                                                          use fmin_fmax_functions
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              real(8), intent (in) :: z
                                                                                                                              code = fmax(((-30.0d0) * x), (abs((30.0d0 * x)) - 0.2d0))
                                                                                                                          end function
                                                                                                                          
                                                                                                                          public static double code(double x, double y, double z) {
                                                                                                                          	return fmax((-30.0 * x), (Math.abs((30.0 * x)) - 0.2));
                                                                                                                          }
                                                                                                                          
                                                                                                                          def code(x, y, z):
                                                                                                                          	return fmax((-30.0 * x), (math.fabs((30.0 * x)) - 0.2))
                                                                                                                          
                                                                                                                          function code(x, y, z)
                                                                                                                          	return fmax(Float64(-30.0 * x), Float64(abs(Float64(30.0 * x)) - 0.2))
                                                                                                                          end
                                                                                                                          
                                                                                                                          function tmp = code(x, y, z)
                                                                                                                          	tmp = max((-30.0 * x), (abs((30.0 * x)) - 0.2));
                                                                                                                          end
                                                                                                                          
                                                                                                                          code[x_, y_, z_] := N[Max[N[(-30.0 * x), $MachinePrecision], N[(N[Abs[N[(30.0 * x), $MachinePrecision]], $MachinePrecision] - 0.2), $MachinePrecision]], $MachinePrecision]
                                                                                                                          
                                                                                                                          \begin{array}{l}
                                                                                                                          
                                                                                                                          \\
                                                                                                                          \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - 0.2\right)
                                                                                                                          \end{array}
                                                                                                                          
                                                                                                                          Derivation
                                                                                                                          1. Initial program 43.5%

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

                                                                                                                            \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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. Step-by-step derivation
                                                                                                                            1. Applied rewrites20.8%

                                                                                                                              \[\leadsto \mathsf{max}\left(\color{blue}{-30 \cdot x}, \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 y around 0

                                                                                                                              \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\color{blue}{\sin \left(30 \cdot x\right) + \cos \left(30 \cdot x\right) \cdot \sin \left(30 \cdot z\right)}\right| - \frac{1}{5}\right) \]
                                                                                                                            3. Step-by-step derivation
                                                                                                                              1. Applied rewrites20.5%

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

                                                                                                                                \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|\sin \left(30 \cdot x\right)\right| - \frac{1}{5}\right) \]
                                                                                                                              3. Step-by-step derivation
                                                                                                                                1. Applied rewrites19.6%

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

                                                                                                                                  \[\leadsto \mathsf{max}\left(-30 \cdot x, \left|30 \cdot x\right| - \frac{1}{5}\right) \]
                                                                                                                                3. Step-by-step derivation
                                                                                                                                  1. Applied rewrites30.9%

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

                                                                                                                                  Reproduce

                                                                                                                                  ?
                                                                                                                                  herbie shell --seed 2025026 
                                                                                                                                  (FPCore (x y z)
                                                                                                                                    :name "Gyroid sphere"
                                                                                                                                    :precision binary64
                                                                                                                                    (fmax (- (sqrt (+ (+ (pow (* x 30.0) 2.0) (pow (* y 30.0) 2.0)) (pow (* z 30.0) 2.0))) 25.0) (- (fabs (+ (+ (* (sin (* x 30.0)) (cos (* y 30.0))) (* (sin (* y 30.0)) (cos (* z 30.0)))) (* (sin (* z 30.0)) (cos (* x 30.0))))) 0.2)))