I create for pleasure, but I still want to seriously approach it, the site on which various tests are conducted. With these tests, I hope to collect statistics.
Some of the data will include the percentage of completeness of the tests as time passes. I can easily calculate the percentage of tests, but I would like the true data to be returned when I store various values related to the tests at the end.
Most of the values are in PHP floats, so my question is that if I need true statistics, I have to store them in MYSQL as FLOAT, DOUBLE or DECIMAL.
I would like to use MYSQL functions such as AVG() and LOG10() , as well as TRUNCATE() . For MYSQL to return true data based on my values, which I insert, which I should use as a selection of the database column.
I ask because some numbers may or may not be floating, for example, 10, 10.89, 99.09, or just 0. But I would like true and reliable statistics to be returned.
Can I rely on floating point math?
EDIT
I know that this is a general question, and I apologize widely, but for non-mathematicians like me, I am also not an expert on MYSQL, I would like to receive the opinion of an expert in this field.
I have done my research, but I still feel that I have a muddy judgment on this issue. Again, I apologize if my question does not fit the topic or is not suitable for this site.
double decimal floating-point mysql
PEPLOVE Oct 26 '13 at 1:53 on 2013-10-26 01:53
source share