Skip to content

Poco::NumberFormatter double length #209

@aleks-f

Description

@aleks-f

From forum:

http://pocoproject.org/forum/viewtopic.php?f=12&t=5896

by stayprivate » Fri May 31, 2013 2:52 pm

POCO_MAX_FLT_STRING_LEN is defined to be 128 but a double could take a lot more space then 128.

Looking around the web I found this for a definition of max length:

1/'-'/ + (DBL_MAX_10_EXP+1)/308+1 digits/ + 1/'.'/ + 6/Default? precision/ + 1/\0/DBL_MAX_10_EXP.

In fact on my platform Poco::NumberFormatter::append( str, DBL_MAX) will crash.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions