add RoundingMode argument to convert#8845
Conversation
6fe2d1e to
86761e6
Compare
|
It turns out to be significantly quicker to just do an explicit check than actually play around with rounding modes (about 20x for Float64 -> Float32). |
|
Love this. |
|
Great! Could we add these methods to Why are the |
|
The I'll look at moving it from That said, it did occur to me that this is actually much more general: once we have correct comparisons, the code I've used in the |
|
This is nice. |
|
Okay, I've moved the rounding versions from |
|
I think the documentation could go in: with a mention in: |
|
This didn't merge cleanly anymore, so i rebased and added some docs. |
|
Thanks for doing that, I didn't get time to look at it over the weekend. |
Adds an extra
RoundingModeargument to someconvertcalls. This allows things likeThis uses stagedfunctions internally, so reduce to constants at runtime. I've also tried to improve the docs a bit.
It occurs to me that we could also use also stagedfunctions to get rid of the "value" argument in the
@math_constmacro.cc: @nolta