Skip to content

Commit

Permalink
Bug in fixed-point input.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Mar 17, 2021
1 parent ea5bd72 commit 2bc9901
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Processor/FixInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

#include "FixInput.h"

#include <math.h>

template<>
void FixInput_<Integer>::read(std::istream& in, const int* params)
{
double x;
in >> x;
items[0] = x * (1 << *params);
items[0] = x * exp2(*params);
}

template<>
Expand All @@ -23,6 +25,6 @@ void FixInput_<bigint>::read(std::istream& in, const int* params)
#else
double x;
in >> x;
items[0] = x * (1 << *params);
items[0] = x * exp2(*params);
#endif
}

0 comments on commit 2bc9901

Please sign in to comment.