|
|
Home » U++ Library support » U++ SQL » Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part! [message #47541 is a reply to message #47540] |
Thu, 26 January 2017 02:23 |
|
I test timings:
Test code:
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
double a;
String s = "269.96336996337";
#define LOOPS 1000000
for(int i = 0; i < LOOPS; i++){
RTIMING("Using atof");
a = atof(s);
}
for(int i = 0; i < LOOPS; i++){
RTIMING("Using ScanDouble");
a = ScanDouble(s);
}
}
TIMING results:
TIMING Using ScanDouble: 1.12 s - 1.12 us ( 1.22 s / 1000000 ), min: 0.00 ns, max: 1.00 ms, nesting: 1 - 1000000
TIMING Using atof : 337.45 ms - 337.45 ns (439.00 ms / 1000000 ), min: 0.00 ns, max: 1.00 ms, nesting: 1 - 1000000
It's not dramatically slower! But standard settings (on various environments) show right results!
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
|
|
Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: unodgs on Mon, 23 January 2017 07:34
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: Klugier on Mon, 23 January 2017 09:38
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Wed, 25 January 2017 11:30
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: Klugier on Wed, 25 January 2017 18:42
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Wed, 25 January 2017 19:02
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Wed, 25 January 2017 19:49
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Wed, 25 January 2017 20:40
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Thu, 26 January 2017 14:10
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Thu, 26 January 2017 15:01
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: mirek on Thu, 26 January 2017 09:09
|
|
|
Re: Huge error of Postgresql! Double fields by transmission to the program lose a fractional part!
By: Klugier on Wed, 25 January 2017 19:03
|
Goto Forum:
Current Time: Sat May 11 09:04:35 CEST 2024
Total time taken to generate the page: 0.04619 seconds
|
|
|