Difference between revisions of "Numeric Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>{{betamanual|version=4.2}}
+
<noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|geogebra}}
{{command|CAS}}
+
==CAS Syntax==
;Numeric[ <Expression> ]
+
;Numeric( <Expression> )
 
:Tries to determine a numerical approximation of the given expression. The number of decimals depends on the global rounding you choose in the [[Options Menu]].
 
:Tries to determine a numerical approximation of the given expression. The number of decimals depends on the global rounding you choose in the [[Options Menu]].
:{{example|1=<div><code><nowiki>Numeric[3 / 2]</nowiki></code> yields ''1.5''.</div>}}
+
:{{example|1=<code><nowiki>Numeric(3 / 2)</nowiki></code> yields ''1.5''.}}
;Numeric[ <Expression>, <significant figures> ]
+
 
 +
 
 +
;Numeric( <Expression>, <Significant Figures> )
 
:Tries to determine a numerical approximation of the given expression, using the entered number of significant figures.
 
:Tries to determine a numerical approximation of the given expression, using the entered number of significant figures.
:{{example|1=<div><code><nowiki>Numeric[sin(1), 20]</nowiki></code> yields ''0.84147098480789650665''.</div>}}
+
:{{example|1=<code><nowiki>Numeric(sin(1), 20)</nowiki></code> yields ''0.84147098480789650665''.}}
 +
 
 +
{{note|1=If you don't specify enough digits then you can get an apparently wrong answer due to [http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html floating point cancelation].
 +
:{{example|1=
 +
<code>Numeric(-500000000/785398163*sin(785398163/500000000)*1258025227.19^2+500000000/785398163*1258025227.19^2,10)</code> will give ''4096'' but <code>Numeric(-500000000/785398163*sin(785398163/500000000)*1258025227.19^2+500000000/785398163*1258025227.19^2,30)</code> will give ''0.318309886345536696694580314215''.}}
 +
}}
 +
{{Note| See also [[File:Mode nsolve.svg|link=|24px]] [[Numeric Tool|Numeric]] tool. }}

Latest revision as of 10:59, 12 October 2017


CAS Syntax

Numeric( <Expression> )
Tries to determine a numerical approximation of the given expression. The number of decimals depends on the global rounding you choose in the Options Menu.
Example: Numeric(3 / 2) yields 1.5.


Numeric( <Expression>, <Significant Figures> )
Tries to determine a numerical approximation of the given expression, using the entered number of significant figures.
Example: Numeric(sin(1), 20) yields 0.84147098480789650665.


Note: If you don't specify enough digits then you can get an apparently wrong answer due to floating point cancelation.
Example: Numeric(-500000000/785398163*sin(785398163/500000000)*1258025227.19^2+500000000/785398163*1258025227.19^2,10) will give 4096 but Numeric(-500000000/785398163*sin(785398163/500000000)*1258025227.19^2+500000000/785398163*1258025227.19^2,30) will give 0.318309886345536696694580314215.
Note: See also Mode nsolve.svg Numeric tool.
© 2024 International GeoGebra Institute