2
$\begingroup$

I was under the impression that Internal`StringToMReal removed string characters that were not digits and converted those to numbers.

However this fails on "OE2", see below.

Is my understanding of the function correct and if so is this a bug?

Internal`StringToMReal["O2"] (* 2 *)
Internal`StringToMReal["OE2"] (* 0 *)
Internal`StringToMReal["OA2"] (* 2 *)
Internal`StringToMReal["OZ2"] (* 2 *)

Edit: I am on version "14.0.0 for Microsoft Windows (64-bit) (December 13, 2023)"

$\endgroup$
2
  • 4
    $\begingroup$ Not a bug per se though it should really be complaining about the letters with a Failure message. It's interpreting the 'E' as scientific notation but the mantissa is 0 (0x10^x) . Also this is an undocumented internal function so you shouldn't use it if you're expecting well defined behaviour. $\endgroup$
    – flinty
    Commented Jul 16 at 8:30
  • $\begingroup$ Hi @flinty, that makes sense. Could you kindly post your comment as an answer? $\endgroup$ Commented Jul 16 at 10:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.