Bug 394

Summary: tan(90) will cause the program to get stuck
Product: Group37 Reporter: PAN Zhenyuan <pzyhihihi>
Component: calculation operationAssignee: feiwu25-c
Status: RESOLVED FIXED    
Severity: normal CC: tommyhonym
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Windows   

Description PAN Zhenyuan 2020-11-07 15:57:32 HKT
I was using the Scientific calculator in normal calculation mode in Windows 10 PC. I found a major bug that if I tell it to calculate tan(90), it will get stuck and I can't do anymore operations.

To reproduce this bug, just run main.java and type 1, enter, and type tan(90) and then enter.The program will get stuck.
Comment 1 PAN Zhenyuan 2020-11-07 18:39:27 HKT
Overview:
tan(90) will cause the program to get stuck

Step to reproduce:
1) Start the calculator
2) Enter 2 to enter Normal Calculation
3) Enter 2 to input algo
4) Enter tan(90)
5) Press Enter to continue

Expected Result:
error message of invalid input.

Actual Result:
no response


Build Date & Hardware:
07-11-2020 on Window 10.0.18363
Comment 2 PAN Zhenyuan 2020-11-07 18:40:53 HKT
(In reply to PAN Zhenyuan from comment #1)
> Overview:
> tan(90) will cause the program to get stuck
> 
> Step to reproduce:
> 1) Start the calculator
> 2) Enter 2 to enter Normal Calculation
> 3) Enter 2 to input algo
> 4) Enter tan(90)
> 5) Press Enter to continue
> 
> Expected Result:
> error message of invalid input.
> 
> Actual Result:
> no response
> 
> 
> Build Date & Hardware:
> 07-11-2020 on Window 10.0.18363

In tan function input should be checked and if it is invalid, exception should be thrown.
Comment 3 PAN Zhenyuan 2020-11-16 21:54:13 HKT
Fixed by throwing an exception.