[PHP] Help. Floats turning into really small numbers? x.xxxxxxxxxxxxxxxxxxxxxxE-xx

2005-04-04 Thread Anthony Tippett
I'm having trouble figuring out why subtraction of two floats are giving me a very small number. I'm thinking it has something to do with the internals of type casting, but i'm not sure. If anyone has seen this or can give me some suggestions, please. I have 2 variables that go through a while

Re: [PHP] [Q] mail() security

2005-04-04 Thread Anthony Tippett
Eric, It sounds like you just need to do some reading on best practices of security when writing php code. It's pretty vast what one can do when trying to hack a php application and depending on what php server settings are set, you may need to do certain things. I'd suggesting reading / google

Re: [PHP] Help. Floats turning into really small numbers? x.xxxxxxxxxxxxxxxxxxxxxxE-xx - Narrowed it down!

2005-04-04 Thread Anthony Tippett
* 1; print $a.br; // 18.49 var_dump($a); // float(18.49) var_dump($a-18.49); // float(3.5527136788005E-15) ? Anthony Tippett wrote: I'm having trouble figuring out why subtraction of two floats are giving me a very small number. I'm thinking it has something to do with the internals of type

Re: [PHP] PHP Tool to answer emails

2005-04-04 Thread Anthony Tippett
I think what you are looking for is a combination of programs. A mailing list that customers can view answers of emails try mailman or smartlist. Perhaps just a mailint list would give you want you want. If you are looking for more of a trouble ticket program, or FAQ program there are serveral

Re: [PHP] Help. Floats turning into really small numbers? x.xxxxxxxxxxxxxxxxxxxxxxE-xx - Narrowed it down!

2005-04-04 Thread Anthony Tippett
number X you like. Or you can look at something like BC_MATH where precision can be carried out as far as you like... But what you are seeing is to be expected. That's just the way computers work, basically. On Mon, April 4, 2005 5:07 pm, Anthony Tippett said: Ok i've narrowed

Re: [PHP] Help. Floats turning into really small numbers? x.xxxxxxxxxxxxxxxxxxxxxxE-xx - Narrowed it down!

2005-04-04 Thread Anthony Tippett
very small) internal conversion differences (0.27755575615629 in your example) or use the bcmath extension, although for monetary values you should go perfectly fine with using round(...,2) on your final results Anthony Tippett wrote: btw, thanks for your response. I'm