Revision history for KeyPgOpExponentiate


Revision [21032]

Last edited on 2016-03-13 06:18:05 by fxm [Formatting]

No Differences

Revision [20382]

Edited on 2016-02-10 16:04:34 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **^** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgDouble|double]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
This also means that you should be wary of using rounding methods such as ##[[KeyPgInt|Int]]## and ##[[KeyPgFix|Fix]]## on the result: if you expect the result to be an integer value, then there's a chance that it might be slightly lower, and will round down to a value that is one less than you would expect.
Note: This operator exists in C/""C++"" with a different meaning - there it performs a Bitwise ##[[KeyPgOpXor|Xor]]##.
- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.
- [[CatPgMath|Mathematical Functions]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **^** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]]
This also means that you should be wary of using rounding methods such as ##[[KeyPgInt Int]]## and ##[[KeyPgFix Fix]]## on the result: if you expect the result to be an integer value, then there's a chance that it might be slightly lower, and will round down to a value that is one less than you would expect.
Note: This operator exists in C/""C++"" with a different meaning - there it performs a Bitwise ##[[KeyPgOpXor Xor]]##.
- In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded.
- [[CatPgMath Mathematical Functions]]


Revision [16354]

Edited on 2012-09-21 22:50:54 by CountingPine [Different meaning in C]
Additions:
Note: This operator exists in C/""C++"" with a different meaning - there it performs a Bitwise ##[[KeyPgOpXor Xor]]##.


Revision [13818]

Edited on 2008-10-30 12:20:35 by CountingPine [Additional warning on the imprecision issue]
Additions:
This also means that you should be wary of using rounding methods such as ##[[KeyPgInt Int]]## and ##[[KeyPgFix Fix]]## on the result: if you expect the result to be an integer value, then there's a chance that it might be slightly lower, and will round down to a value that is one less than you would expect.


Revision [13813]

Edited on 2008-10-26 14:10:18 by CountingPine [Accuracy issues]
Additions:
//result// = //lhs// **^** //rhs//
**##Operator ^## (Exponentiate)** returns the result of a base expression (##//lhs//##) raised to some exponent expression (##//rhs//##). ##**^**## works with double float numbers only, operands of other types will be converted into double before performing the exponentiation. Exponent of a fractional value (##1""/""//n//##) is the same as taking ##//n//##th root from the base, for example, ##2 **^** (1/3)## is the cube root of 2.
Note: this operation is not guaranteed to be fully accurate, and there may be some inaccuracy in the least significant bits of the number. This is particularly noticeable when the result is expected to be an exact number: in these cases, you may find the result is out by a very small amount. For this reason, you should never assume that an exponentiation expression will be exactly equal to the value you expect.
Deletions:
//result// = //lhs// **##^##** //rhs//
**##Operator ^## (Exponentiate)** returns the result of a base expression (##//lhs//##) raised to some exponent expression (##//rhs//##). **^** works with double float numbers only, operands of other types will be converted into double before performing the exponentiation. Exponent of a fractional value (1/n) is the same as taking n-th root from the base, for example, 2 **^** (1/3) is the cubed root of 2.


Revision [12392]

The oldest known version of this page was created on 2008-01-18 14:20:39 by JeffMarshall [Accuracy issues]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode