[julia-users] Trigonometric functions at infinity

2014-11-04 Thread isahin
I have recently become aware of Julia and have been impressed with its ease of use and speed. While I was converting my previous code to Julia, I noticed that trigonometric functions at infinity yield DomainError and abort the program. Try sin(Inf), sin(-Inf), cos(Inf), tan(Inf), etc. I check

Re: [julia-users] Trigonometric functions at infinity

2014-11-05 Thread isahin
In order to avoid exiting the program, I am checking for Inf and setting the result to Nan manually for each trigonometric function. I agree with John's comments and hope that something like this would become default behavior. @Milan: Thanks for the link, it is a good one. On Tuesday, Novem

Re: [julia-users] Trigonometric functions at infinity

2014-11-05 Thread isahin
In order to avoid exiting the program, I am checking for Inf and setting the result to Nan manually for each trigonometric function. I agree with John's comments and hope that something like this would become default behavior. @Milan: Thanks for the link, it was a good one.

Re: [julia-users] Trigonometric functions at infinity

2014-11-06 Thread isahin
Nice solution! Thanks.