New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 34 - operator<<(stream) involves log for non integer type
Summary: operator<<(stream) involves log for non integer type
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.0
Hardware: All All
: Low Unknown
Assignee: Gael Guennebaud
URL: http://forum.kde.org/viewtopic.php?f=...
Whiteboard:
Keywords:
: 1083 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-05 23:25 UTC by Gael Guennebaud
Modified: 2015-10-12 13:20 UTC (History)
2 users (show)



Attachments
Remove log, use numeric_limits::digits10, and recursion on T::value_type (5.36 KB, patch)
2015-10-12 13:20 UTC, Gael Guennebaud
no flags Details | Diff

Description Gael Guennebaud 2010-10-05 23:25:51 UTC
while this is not necessarily allowed, e.g., for rational numbers. In other word we need a better implementation of ei_significant_decimals_default_impl.

See this thread:

http://forum.kde.org/viewtopic.php?f=74&t=90670&p=172385

Of course one can still specialize ei_significant_decimals_default_impl for his/her problematic type but that's only a workaround, not a real solution.
Comment 1 Gael Guennebaud 2015-10-12 11:35:00 UTC
*** Bug 1083 has been marked as a duplicate of this bug. ***
Comment 2 Gael Guennebaud 2015-10-12 13:20:00 UTC
Created attachment 614 [details]
Remove log, use numeric_limits::digits10, and recursion on T::value_type

Here is a patch removing the manual log10 in favor to the use of numeric_limits::digits10. For containers as scalar types (e.g., array, matrices, complex, etc.) the default implementation recursively search for the most primitive value type before calling numeric_limits.

Note You need to log in before you can comment on or make changes to this bug.