Reputation: 417
nothing is ever simple for bacpropagation
with php? or examples of the case of solving problem XOR
? whether you want to share?
I've created, XOR
, too, just not maximized. this, declaration variable type double in the php there is do not rules?? because i have a problem when the variable whose value -5.92878775009E-323
multiplied by (*) 0.00310811260635
is 0
;
I tried in excel too, error / zero, meaning the problem is of variable length that I specify, while the variable I declared value "null"
as "public w = null"
. sorry a lot of questions ..
thanks if you want to answer my questions..
Upvotes: 0
Views: 1074
Reputation: 1002
-5.92878775009E-323 is such a ridiculously small number that it will compute as zero. The best way to handle this is to use standard exponent mathematics.
I would handle this by multiplying the digits then summing the exponents in a custom function. That having been said, if you need to manage these numbers, you are probably already losing a lot of information in the rounding to 12 significant figures.
If you need to do this without loss of data, the only way I can think of doing it is to use the computer to do the multiplication much in the same way it is handled on paper, one digit at a time.
Why not write a function like this?
Alternatively, if you are not feeling suicidal, try bcmul() which is a PHP function that does exactly what you need.
Upvotes: 1