An apparatus for computing mathematical functions, the apparatus comprising: a pre-processing hardware stage configured to take as inputs an opcode corresponding to Asin, Acos, Atan or Atan2 and one or two input arguments (x; (x,y)) and to produce one or more pre-processing output arguments (s; (s,t) ; (v,s,t)) according to the one or two input arguments (x; (x,y)) and the opcode when the opcode corresponds to Asin, Atan, or Atan2 and to produce one pre-processing output argument (s) according to one of the one or two input arguments (x) and the opcode when the opcode corresponds to Acos; an inverse function hardware stage configured to calculate a value G(Z) = Acos(Z)/Sqrt(1-Z*Z) for opcodes corresponding to all of Asin, Acos, Atan, and Atan2, where Z is one of the pre-processing output arguments (s) if the opcode corresponds to Asin, Atan or Atan2 and where Z is the absolute value of one of the one or two input arguments (|x|) if the opcode corresponds to Acos, and to generate one or two inverse function output arguments (Out1; (Out1,Out2)), where G(Z) is used to generate the first inverse function output argument (Out1)); and a post-processing hardware stage configured to obtain the final result from the first inverse function output argument (Out1) and at least one of the one or two input arguments (x), one of the pre-processing output arguments (s;t) and the second inverse function output argument (Out2) depending on the opcode; wherein the pre-processing, inverse function, and post-processing hardware stages are configured to produce final results corresponding to Asin, Acos, Atan, and Atan2 according to the opcode. a pre-processing hardware stage configured to take as inputs an opcode corresponding to Asin, Acos, Atan or Atan2 and one or two input arguments (x; (x,y)) and to produce one or more pre-processing output arguments (s; (s,t) ; (v,s,t)) according to the one or two input arguments (x; (x,y)) and the opcode when the opcode corresponds to Asin, Atan, or Atan2 and to produce one pre-processing output argument (s) according to one of the one or two input arguments (x) and the opcode when the opcode corresponds to Acos; an inverse function hardware stage configured to calculate a value G(Z) = Acos(Z)/Sqrt(1-Z*Z) for opcodes corresponding to all of Asin, Acos, Atan, and Atan2, where Z is one of the pre-processing output arguments (s) if the opcode corresponds to Asin, Atan or Atan2 and where Z is the absolute value of one of the one or two input arguments (|x|) if the opcode corresponds to Acos, and to generate one or two inverse function output arguments (Out1; (Out1,Out2)), where G(Z) is used to generate the first inverse function output argument (Out1)); and a post-processing hardware stage configured to obtain the final result from the first inverse function output argument (Out1) and at least one of the one or two input arguments (x), one of the pre-processing output arguments (s;t) and the second inverse function output argument (Out2) depending on the opcode; wherein the pre-processing, inverse function, and post-processing hardware stages are configured to produce final results corresponding to Asin, Acos, Atan, and Atan2 according to the opcode. <EOS>