add @sqrt built-in function

See #767
This commit is contained in:
Andrew Kelley
2018-04-15 13:21:52 -04:00
parent 4a2bfec150
commit b5459eb987
13 changed files with 419 additions and 288 deletions

View File

@@ -181,3 +181,7 @@ bool bigfloat_has_fraction(const BigFloat *bigfloat) {
f128M_roundToInt(&bigfloat->value, softfloat_round_minMag, false, &floored);
return !f128M_eq(&floored, &bigfloat->value);
}
void bigfloat_sqrt(BigFloat *dest, const BigFloat *op) {
f128M_sqrt(&op->value, &dest->value);
}