bearophile wrote:
I don't understand where the result differences come from in this code:
import std.math: sqrt, PI;
import std.stdio: writefln;
void main() {
const double x1 = 3.0 * PI / 16.0;
writefln("%.17f", sqrt(1.0 / x1));
double x2 = 3.0 * PI / 16.0;
writefln("%.17f", sqrt(1.0 /
I don't understand where the result differences come from in this code:
import std.math: sqrt, PI;
import std.stdio: writefln;
void main() {
const double x1 = 3.0 * PI / 16.0;
writefln("%.17f", sqrt(1.0 / x1));
double x2 = 3.0 * PI / 16.0;
writefln("%.17f", sqrt(1.0 / x2));
real x3 =