0

I get the following Meijer function as a result of a symbolic integration:

expr = MeijerG[{{1, 3/2}, {}}, {{1, 1}, {1/2}}, x].

I try to calculate numerical values of this function for a series of arguments x > 0. This turns out to be not possible for 'Form'-ed real arguments.

Entering manually, e.g., x = 0.000000001 and evaluating expr for this argument is successful: expr = 4.42921*10^-8. However, the execution of expr after converting x in any "*Form", e.g., x = ScientificForm[x], is left undone (merely above given rhs- definition of expr is mirrored, but no error message is given). I have tried this for other formats like NumberForm, DecimalForm, AccountingForm with the same useless output.

For many application programs this problem may not be relevant, because they pass arguments directly to an evaluator. But many applications written in the python language and using an python-Mathematica-interface like the open source CAS Sage are transforming the argument in the scientific form, if abs(x) < 10^(-5). Thus, such applications cannot compute numerical results for small arguments by using the Mathematica version of the above mentioned MeijerG-function.

Is it possible by any means to circumvent this problem?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
bekad
  • 1
  • 1
  • 2
    Only use Form for display. Don't use them in computation. Don't use x = ScientificForm[x]. Just use x. – b3m2a1 Nov 26 '19 at 23:35
  • The behavior you are experiencing isn't peculiar to the MeijerG function: it is the normal behavior of any function that tries to perform a numeric computation with an argument wrapped with one of *Form display wrappers. – m_goldberg Nov 27 '19 at 02:59
  • Use parentheses to exclude the Form from the definition, e.g., (x = 0.000000001) // ScientificForm – Bob Hanlon Nov 27 '19 at 03:31
  • Many thanks for the advices. They are helpful for me to understand the purpose of Mathematica's Forms more clearly. From your infos I conclude that the problem might be located in the mentioned Python-Mathematica-Interface of the open-source CAS SageMath. Apparently the python language converts any number < 1.e-5 into a form that Mathematica interprets as ScientificForm .So, I will pass my questtion to the StackExchange forum of Sage in order to find a solution avoiding this format change. – bekad Nov 27 '19 at 08:06
  • As announced, I have put the same question to the stack exchange of the open-source sagemath:(https://ask.sagemath.org/question/48908/how-to-avoid-scientific-notation-of-numbers-in-the-mathematica-interface/). The answer acknowledges a bug in the Mathematica-interface of Sagemath. In addition, a workaround is presented. From my point of view the answer can be taken as an answer to my question also in this forum. Since I don't know how to answer here my own question, I give this info as a comment. – bekad Nov 28 '19 at 18:31

0 Answers0