When raising to a power of a fractional number, an incorrect subtraction occurs:
import std.stdio;
void main()
{
float x;
x=1/2;
writeln (4^^x);
writeln (4^^(1/2));
}
Thread overview |
---|
April 29, 2021 Error in code calculation | ||||
---|---|---|---|---|
| ||||
When raising to a power of a fractional number, an incorrect subtraction occurs: import std.stdio; void main() |
April 29, 2021 Re: Error in code calculation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sergei | On Thursday, 29 April 2021 at 17:17:11 UTC, Sergei wrote: >When raising to a power of a fractional number, an incorrect subtraction occurs: import std.stdio; void main() Probably more approach for Learn. Your problem becomes apparent if you |