Skip to content

Commit

Permalink
use long double to capture full possible sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
tesch1 committed Jul 22, 2018
1 parent af28d55 commit a3c45bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EigenLab.h
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ namespace EigenLab
if(sfirst == slast) {
mat = sfirst;
} else if(sfirst < slast && sstep > 0) {
unsigned n = 1 + floor((slast - sfirst) / sstep);
long double n = 1 + floor((slast - sfirst) / sstep);
if (n < 0 || n > EIGENLAB_MAXMATRIX)
throw std::runtime_error("Invalid matrix size requested '" + std::to_string(n) + "', set EIGENLAB_MAXMATRIX to allow larger matrices.");
mat.local().resize(1, n);
Expand Down

0 comments on commit a3c45bf

Please sign in to comment.