As part of the PHP project, I need to return the sine value of each value included in an arbitrary interval. Moreover, I also need to be able to set the "area" of the function, that is, how many decimal places I need cyclically.
For example: 1 decimal place for an interval from 1 to 3 inclusive: 1, 1.1, 1.2, ... 2.8, 2.9, 3
2 decimal places for the same interval
1, 1.01, 1.02 ... 2.98, 2.99, 3
Etc ... I tried to do this with the for loop, but it would only consider natural numbers.
Suggestions?
source share