## [Maxima-bugs] [ maxima-Bugs-2825082 ] %pi^1.0b0 --> floating point value

 [Maxima-bugs] [ maxima-Bugs-2825082 ] %pi^1.0b0 --> floating point value From: SourceForge.net - 2009-07-25 20:05:01 ```Bugs item #2825082, was opened at 2009-07-22 00:20 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2825082&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Simplification Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: %pi^1.0b0 --> floating point value Initial Comment: The exponent is a bigfloat number, but a floating point number is returned: (%i16) %pi^1.0b0; (%o16) 3.141592653589793 (%i17) %gamma^1.0b0; (%o17) .5772156649015329 The only case which is handled correctly is %e: (%i18) %e^1.0b0; (%o18) 2.718281828459045b0 That is the piece of code in simpexpt, which can handle the other numeric constants too: ((onep1 pot) ;; Exponent is One. (let ((y (mget gr '\$numer))) (if (and y (floatp y) (or \$numer (not (equal pot 1)))) ;; Base is a numeric constant with a floating point value or ;; \$numer is TRUE and the Exponent is not the integer One. (return (if (and (member gr *builtin-numeric-constants*) (equal pot bigfloatone)) ;; Convert numeric constant to bigfloat value. (\$bfloat gr) ;; Can we reach this point? y)) ;; Handle other cases in exptrl. (return (exptrl gr pot))))) We get: (%i16) %pi^1.0b0; (%o16) 3.141592653589793b0 (%i17) %gamma^1.0b0; (%o17) 5.772156649015329b-1 (%i18) %phi^1.0b0; (%o18) 1.618033988749895b0 Dieter Kaiser ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2009-07-25 22:05 Message: With revision 1.87 of simp.lisp all numeric constants return a bigfloat number, if the exponent is bigfloat one. Closing this bug report as fixed. Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2825082&group_id=4933 ```

### Thread view

 [Maxima-bugs] [ maxima-Bugs-2825082 ] %pi^1.0b0 --> floating point value From: SourceForge.net - 2009-07-21 22:20:06 ```Bugs item #2825082, was opened at 2009-07-22 00:20 Message generated for change (Tracker Item Submitted) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2825082&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Simplification Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: %pi^1.0b0 --> floating point value Initial Comment: The exponent is a bigfloat number, but a floating point number is returned: (%i16) %pi^1.0b0; (%o16) 3.141592653589793 (%i17) %gamma^1.0b0; (%o17) .5772156649015329 The only case which is handled correctly is %e: (%i18) %e^1.0b0; (%o18) 2.718281828459045b0 That is the piece of code in simpexpt, which can handle the other numeric constants too: ((onep1 pot) ;; Exponent is One. (let ((y (mget gr '\$numer))) (if (and y (floatp y) (or \$numer (not (equal pot 1)))) ;; Base is a numeric constant with a floating point value or ;; \$numer is TRUE and the Exponent is not the integer One. (return (if (and (member gr *builtin-numeric-constants*) (equal pot bigfloatone)) ;; Convert numeric constant to bigfloat value. (\$bfloat gr) ;; Can we reach this point? y)) ;; Handle other cases in exptrl. (return (exptrl gr pot))))) We get: (%i16) %pi^1.0b0; (%o16) 3.141592653589793b0 (%i17) %gamma^1.0b0; (%o17) 5.772156649015329b-1 (%i18) %phi^1.0b0; (%o18) 1.618033988749895b0 Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2825082&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2825082 ] %pi^1.0b0 --> floating point value From: SourceForge.net - 2009-07-25 20:05:01 ```Bugs item #2825082, was opened at 2009-07-22 00:20 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2825082&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Simplification Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: %pi^1.0b0 --> floating point value Initial Comment: The exponent is a bigfloat number, but a floating point number is returned: (%i16) %pi^1.0b0; (%o16) 3.141592653589793 (%i17) %gamma^1.0b0; (%o17) .5772156649015329 The only case which is handled correctly is %e: (%i18) %e^1.0b0; (%o18) 2.718281828459045b0 That is the piece of code in simpexpt, which can handle the other numeric constants too: ((onep1 pot) ;; Exponent is One. (let ((y (mget gr '\$numer))) (if (and y (floatp y) (or \$numer (not (equal pot 1)))) ;; Base is a numeric constant with a floating point value or ;; \$numer is TRUE and the Exponent is not the integer One. (return (if (and (member gr *builtin-numeric-constants*) (equal pot bigfloatone)) ;; Convert numeric constant to bigfloat value. (\$bfloat gr) ;; Can we reach this point? y)) ;; Handle other cases in exptrl. (return (exptrl gr pot))))) We get: (%i16) %pi^1.0b0; (%o16) 3.141592653589793b0 (%i17) %gamma^1.0b0; (%o17) 5.772156649015329b-1 (%i18) %phi^1.0b0; (%o18) 1.618033988749895b0 Dieter Kaiser ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2009-07-25 22:05 Message: With revision 1.87 of simp.lisp all numeric constants return a bigfloat number, if the exponent is bigfloat one. Closing this bug report as fixed. Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2825082&group_id=4933 ```