Well, it works with the real ball field or with more precision : R = RBF a = exp(-12*pi) R(a),a.n(100) ([4.2411511830161e-17 +/- 2.87e-31], 4.2411511830160775440174644060e-17)
Another place to ask questions is https://ask.sagemath.org/ Le lundi 5 juillet 2021 à 08:04:44 UTC+2, Brian Lawrence a écrit : > > Hi, > > I'm new to Sage, and I'm running across some unexpected behavior involving > numerical evaluation of exponentials involving pi. > > In my version (Sagemath 9.2), the following code > exp(-12.0*pi).n() > gives the output below. > 0.000000000000000 > > The true value of the exponential is something like 4e-17: very small, but > definitely not zero. The problem seems to be that Sage internally converts > the exponential to a difference (cosh-sinh) of two huge numbers, and then > precision problems kick in. > > This problem has been brought up before... > https://ask.sagemath.org/question/57182/numerical- > approximation-error-involving-cosh-and-sinh/ > ... but the folks over there seem to have concluded (for reasons I don't > understand) that the behavior is not a bug at all. > > Brian Lawrence > > 'SageMath version 9.2, Release Date: 2020-10-24' > > (P.S. I ran across this trying to do some computations with q-expansions > of modular forms, where these sorts of exponentials are quite common.) > > (P.P.S. Apologies if I'm posting this in the wrong place, I'm new here and > not familiar with local norms...) > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/bfc7f7d7-57fc-496a-ac42-31fa2f6a2349n%40googlegroups.com.