Version 6 of tan

Updated 2007-11-02 18:50:48 by HarmOlthof

A function in the expr command that computes the tangent of an angle. The angle is expressed in radians.


2007-11-01 Harm Olthof: I was just wondering how to get tan return +/-Inf (and what choice it would make for the sign).

 59 % expr tan(acos(0))
  16331778728383844.0
 60 % expr tan(acos(0.0))
  16331778728383844.0
 61 % set pi 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068
 62 % expr tan(double($pi/2.0))
  16331778728383844.0

EKB What version of Tcl are you using? (By the way, this should probably go to comp.lang.tcl instead of here.)

LV Actually, this is a fine place to ask questions like this. On the other hand, asking on comp.lang.tcl is a fine place to get answers as well.

Harm Olthof - If someone can come up with an answer it is easier to be found on the wiki if someone would look for it later. Back to my question, here is the context:

 (Desktop) 63 % info patchlevel
   8.5a5
 (Desktop) 64 % parray tcl_platform
  tcl_platform(byteOrder) = littleEndian
  tcl_platform(machine)   = intel
  tcl_platform(os)        = Windows NT
  tcl_platform(osVersion) = 5.1
  tcl_platform(platform)  = windows
  tcl_platform(threaded)  = 1
  tcl_platform(user)      = harm
  tcl_platform(wordSize)  = 4