0
Why some kind of expressions not working on my calculator?
When I input 2/5 it's fine but when I input 4/5/5 then it's error.Again I am not be able to evaluate two trigonometry expression like sin(20)+sin(70).But It make no sense as I checked the codes many times. Recommend me how to develop the codes and make this better.Thanks in advance. https://code.sololearn.com/WJ52vscdRcBS/?ref=app
6 Respuestas
+ 2
Thanks for your support🥰
I just use regex replacing method instead of string.And now it works like a real Scientific Calculator 😍
+ 1
But those simple expressions are working..😕
I'm taking about the trigonometry and others complex function.
+ 1
check out this:
https://codepen.io/ggetchell/pen/KVgrYq
+ 1
Hi, I think you'll immedialy find the problem if you look at what your code is doing.
One line before `eval(f)`, insert a `console.log(f)` and then rerun your two examples. It should be obvious where things are going wrong. :)
0
checked that one!But I think you should check my calculator for understanding what actually the problem is😔
- 1
https://code.sololearn.com/Wg9eSK80nZaK/?ref=app
you can check