On Tuesday, October 24, 2017 16:59:31 Arun Chandrasekaran via Digitalmars-d-
learn wrote:
> On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote:
> > On Tue, Oct 24, 2017 at 10:02:11AM +, Arun Chandrasekaran
> >
> > via Digitalmars-d-learn wrote:
> >> On Monday, 23 October 2017 at 18:0
On Tue, Oct 24, 2017 at 04:59:04PM +, jmh530 via Digitalmars-d-learn wrote:
> On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote:
> >
> > I have never seen a programming language in which dividing two
> > integers yields a float or double. Either numbers default to a
> > floating p
On 10/24/2017 09:59 AM, Arun Chandrasekaran wrote:
>>> On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote:
>>> > The rule is that every expression has a type and 22/7 is int.
> I'm just questioning the reasoning behind why D does it this way and if
> it is for compatibility or if the
On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote:
I have never seen a programming language in which dividing two
integers yields a float or double. Either numbers default to a
floating point type, in which case you begin with floats in the
first place, or division is integer div
On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote:
On Tue, Oct 24, 2017 at 10:02:11AM +, Arun Chandrasekaran
via Digitalmars-d-learn wrote:
On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote:
> On 10/23/2017 07:22 AM, Arun Chandrasekaran wrote:
> > [...]
> The rule is
On Tue, Oct 24, 2017 at 10:02:11AM +, Arun Chandrasekaran via
Digitalmars-d-learn wrote:
> On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote:
> > On 10/23/2017 07:22 AM, Arun Chandrasekaran wrote:
> > > [...]
> > The rule is that every expression has a type and 22/7 is int.
>
> Th
On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote:
On 10/23/2017 07:22 AM, Arun Chandrasekaran wrote:
> [...]
The rule is that every expression has a type and 22/7 is int.
Thanks Ali. Is this for backward compatibility with C? Because,
if there is a division, a natural/mathematical
On 10/23/2017 07:22 AM, Arun Chandrasekaran wrote:
> void main() {
> double a = 22/7.0;
> import std.stdio: writeln, writefln;
> writefln("%.51f", a);
> }
> But why does the compiler bring the C baggage for the integer
> division? Why do I need to `cast (double)` ?
I think you mea
On Monday, 23 October 2017 at 14:07:06 UTC, Arun Chandrasekaran
wrote:
I've written a simple tool [1] to find the DET and CMC
specifically for biometrics performance measurement.
When I generate the report, I expected to see high precision
floating point numbers, but I see that writefln trims
I've written a simple tool [1] to find the DET and CMC
specifically for biometrics performance measurement.
When I generate the report, I expected to see high precision
floating point numbers, but I see that writefln trims the
precision to the last 6 digits after decimal point.
Am I doing th
10 matches
Mail list logo