Thread overview
Flaoting point operations : unexpected results
2 days ago
seany
2 days ago
Dennis
2 days ago
seany
2 days ago
Alain De Vos
1 day ago
frame
2 days ago

I have (as mentioned before) an AI project in D.
It is doing several million Floating Point operations.

However, i sometimes see, that the results are radically different.

The same input, fed to the same system .

I do not have and random values. There are some foreach loops.

By radically different, i mean, that the computation whether some points are within some bound or not goes completely out of control. Sometimes they produce correct result, sometimes all results are zero.

Is there a "reproducability" problem?

Thank you.

2 days ago

On Thursday, 10 June 2021 at 19:37:36 UTC, seany wrote:

>

However, i sometimes see, that the results are radically different.

Are you using uninitialized memory or multi-threading?

2 days ago

On Thursday, 10 June 2021 at 19:51:51 UTC, Dennis wrote:

>

On Thursday, 10 June 2021 at 19:37:36 UTC, seany wrote:

>

However, i sometimes see, that the results are radically different.

Are you using uninitialized memory or multi-threading?

I am using things like :

double [][] myArr = new double [][] (0,0);

and

double [][] tempArr;

and

class myclass {

 int a ;
 this(){}
 ~this(){}
}

followed by :

myclass mc = new myclass;

I dont think these are "uninitialized"?

2 days ago

Normally computers are deterministic and same input produces same output. There is however theory on neural network stability and it can be tuned.

1 day ago

On Thursday, 10 June 2021 at 20:18:03 UTC, seany wrote:

>

On Thursday, 10 June 2021 at 19:51:51 UTC, Dennis wrote:

>

On Thursday, 10 June 2021 at 19:37:36 UTC, seany wrote:

>

However, i sometimes see, that the results are radically different.

Are you using uninitialized memory or multi-threading?

I am using things like :

double [][] myArr = new double [][] (0,0);

>

I dont think these are "uninitialized"?

Just to clarify, this statement does not initialize double values to 0. It just creates the array with lengths of 0. If you disable range checking as in release mode, you wouldn't see any error here.