New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1639 - Prohibit TriangularSolve for integer types?
Summary: Prohibit TriangularSolve for integer types?
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.4 (development)
Hardware: All All
: Normal Accuracy Problem
Assignee: Nobody
Depends on:
Blocks: 3.x
  Show dependency treegraph
Reported: 2018-12-06 23:14 UTC by Christoph Hertzberg
Modified: 2018-12-07 12:56 UTC (History)
3 users (show)


Description Christoph Hertzberg 2018-12-06 23:14:20 UTC
Calculating any decomposition for integer matrices already fails to compile with a static assertion THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES.
Shouldn't we do the same for triangular solvers?
Would that break any (valid) code?
Comment 1 Gael Guennebaud 2018-12-07 09:24:50 UTC
If the diagonal is filled with 1 (including UnitDiag mode), then this is valid, though I don't have use cases in mind.
Comment 2 Christoph Hertzberg 2018-12-07 12:56:24 UTC
Ok, that is true and might be a valid use case. And of course there can be other cases where all integer divisions happen to be exact. 
Maybe we should just document the current behavior (including that it can lead to uncaught divisions by zero).

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