implement sqrt and add fixme for f128#4902
Conversation
|
Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two. |
| ); | ||
|
|
||
| assert_eq!((a * a).sqrt(), a); | ||
| assert_eq!((b * b).sqrt(), b.abs()); |
There was a problem hiding this comment.
We use direct simd_* calls everywhere else in the test, it looks strangely inconsistent to use overloaded operators here.
| FloatTy::F32 => host_unary_float_op::<SingleS>(this, &op, host_op, &dest)?, | ||
| FloatTy::F64 => host_unary_float_op::<DoubleS>(this, &op, host_op, &dest)?, | ||
| FloatTy::F128 => unimplemented!("f128"), | ||
| FloatTy::F128 => unimplemented!("f128"), // FIXME(f128) |
There was a problem hiding this comment.
While you're at it, do you also want to add FIXMEs for powf128 and powif128?
|
This looks great, thanks! Please squash the commits. You can squash manually if there are multiple independent commits you want to preserve, or use @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
also implement sqrt for f128 (using softfloat) and test sqrt for f16 and f128
597d38b to
c5d842b
Compare
|
@rustbot ready |
Trevor and I have been tracking remaining
f128items usingFIXME(f128), this makes it easier to keep track.The
sqrtfunction is implemented using softfloat, that already works forf128scalars, this just tests the simd version. I'm looking into updatingportable_simdto expose thef16andf128vector types. That has a bit of a dependency chain though, so it may take a little while.