tranleduy2000 / ncalc

Power calculator for Android. Solve some problem algebra and calculus.
GNU General Public License v3.0
679 stars 158 forks source link

The value of tan((2k+1)π/2)is not correct #96

Open PaulZhu0122 opened 3 years ago

PaulZhu0122 commented 3 years ago

Describe the bug

In the scientific calculator module, after choosing tan fuction and entering tan((2k+1)π/2)where k is positive integer, the calculator just displays incorrect result.

Expected behavior

After entering tan((2k+1)π/2, infinity or it doesn't exist is expected to be displayed

To reproduce

  1. Open NCalc+ (Which is build from latest source code)
  2. Go to scientific calculator module
  3. Choose tan function
  4. Enter tan((2k+1)π/2)
  5. Incorrect result has been displayed

    Configuration

    • Android version 9
    • device MI 8 Lite

      Screenshots

      image image

axkr commented 3 years ago

To be clear you mean something like Tan[43*Pi/2]

which should return ComplexInfinity