sin 0.1 = .09983341664682815230
cos 0.1 = .99500416527802576609
Actual result
sin 0.1 = .09983341664682815230
test.bc 2: void expression in print
Workaround
Direct the contents of the script into bc instead of pass by parameter:
$ bc -lq < test.bc
sin 0.1 = .09983341664682815230
cos 0.1 = .99500416527802576609
Other information
As shown by the workaround, the cosine function does work as expected when bc does not execute a script. However it cannot be used when bc executes a script even after the execution finished.
The same issue can be observed when using the Bessel function j(n,x).
The same version of bc does not have the same issue on other platforms, I tried with JSLinux.
I'm not sure if this is an issue with the bc OpenRISC port or the emulator.
This was not an issue on the 3rd of July, 2013 as shown in this forum thread (in Hungarian). The linked script uses both the sine and cosine functions in line 12 and it could be executed with bc without any issues.
Steps to reproduce
Create a file called
test.bc
with the following contentExecute the following command
Expected result
Actual result
Workaround
Direct the contents of the script into
bc
instead of pass by parameter:Other information
As shown by the workaround, the cosine function does work as expected when
bc
does not execute a script. However it cannot be used whenbc
executes a script even after the execution finished.The same issue can be observed when using the Bessel function
j(n,x)
.The same version of
bc
does not have the same issue on other platforms, I tried with JSLinux.I'm not sure if this is an issue with the
bc
OpenRISC port or the emulator.This was not an issue on the 3rd of July, 2013 as shown in this forum thread (in Hungarian). The linked script uses both the sine and cosine functions in line 12 and it could be executed with
bc
without any issues.