Commit eabf0404 authored by Paul Eggert's avatar Paul Eggert

* floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).

This produces more-accurate results.
parent 0b3b1d23
2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
* floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
This produces more-accurate results.
2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (updateFrameSize): Call setFrame: on the view when size
......
......@@ -265,12 +265,12 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0,
(register Lisp_Object arg)
{
double d = extract_float (arg);
double c = cos (d);
#ifdef FLOAT_CHECK_DOMAIN
double c = cos (d);
if (c == 0.0)
domain_error ("tan", arg);
#endif
IN_FLOAT (d = sin (d) / c, "tan", arg);
IN_FLOAT (d = tan (d), "tan", arg);
return make_float (d);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment