Average Error: 0.9 → 0.8
Time: 5.6s
Precision: binary64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\frac{1}{\sqrt{\log 10}} \cdot \left(\sqrt{\frac{1}{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\frac{1}{\sqrt{\log 10}} \cdot \left(\sqrt{\frac{1}{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\right)
(FPCore (re im) :precision binary64 (/ (atan2 im re) (log 10.0)))
(FPCore (re im)
 :precision binary64
 (* (/ 1.0 (sqrt (log 10.0))) (* (sqrt (/ 1.0 (log 10.0))) (atan2 im re))))
double code(double re, double im) {
	return atan2(im, re) / log(10.0);
}
double code(double re, double im) {
	return (1.0 / sqrt(log(10.0))) * (sqrt(1.0 / log(10.0)) * atan2(im, re));
}

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.9

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt_binary64_7820.9

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
  4. Applied *-un-lft-identity_binary64_7600.9

    \[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\]
  5. Applied times-frac_binary64_7660.8

    \[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\]
  6. Taylor expanded around 0 0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\sqrt{\frac{1}{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\right)}\]
  7. Final simplification0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \left(\sqrt{\frac{1}{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\right)\]

Reproduce

herbie shell --seed 2021044 
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  :precision binary64
  (/ (atan2 im re) (log 10.0)))