mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
fix: overflow on high log norm2
This commit is contained in:
@@ -183,7 +183,8 @@ struct FunctionToDag {
|
||||
auto smanp_int = op.getAttrOfType<mlir::IntegerAttr>("SMANP");
|
||||
auto loc = loc_to_string(op.getLoc());
|
||||
assert(smanp_int && "Missing manp value on a crypto operation");
|
||||
double manp = sqrt((double)smanp_int.getValue().getZExtValue());
|
||||
// TODO: use APIFloat.sqrt when it's available
|
||||
double manp = sqrt(smanp_int.getValue().roundToDouble());
|
||||
auto comment = std::string(op.getName().getStringRef()) + " " + loc;
|
||||
index[val] =
|
||||
dag->add_levelled_op(slice(inputs), lwe_dim_cost_factor, fixed_cost,
|
||||
|
||||
Reference in New Issue
Block a user