Skip to content

Commit

Permalink
bug in floating-point less-than
Browse files Browse the repository at this point in the history
  • Loading branch information
deevashwer authored May 24, 2024
1 parent 0a50d7d commit f95e574
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SCI/src/FloatingPoint/floating-point.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/*
Authors: Deevashwer Rathee
Copyright:
Expand Down Expand Up @@ -450,13 +451,11 @@ BoolArray FPOp::LT(const FPArray &x, const FPArray &y, bool equal_sign) {
FixArray y_m, y_e;
tie(y_s, y_z, y_m, y_e) = get_components(y);

BoolArray all_1 = bool_op->input(ALICE, x.size, 1);

FixArray x_em = fix->extend(x_m, x_m.ell + x_e.ell - 1, all_1.data);
FixArray x_em = fix->extend(x_m, x_m.ell + x_e.ell - 1, bool_op->NOT(x_z).data);
x_e.signed_ = false;
x_em = fix->add(x_em, fix->scale_up(x_e, x_m.ell + x_e.ell - 1, x.m_bits));

FixArray y_em = fix->extend(y_m, y_m.ell + y_e.ell - 1, all_1.data);
FixArray y_em = fix->extend(y_m, y_m.ell + y_e.ell - 1, bool_op->NOT(y_z).data);
y_e.signed_ = false;
y_em = fix->add(y_em, fix->scale_up(y_e, y_m.ell + y_e.ell - 1, y.m_bits));

Expand Down

0 comments on commit f95e574

Please sign in to comment.