Difference between revisions of "Comments:Complex Numbers"

From GeoGebra Manual
Jump to: navigation, search
m (r2.7.3rc2) (Robot: Adding nn:Komplekse tal)
m (Text replace - "[[nb:" to "[[no:")
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
<!-- DO NOT EDIT -->{{:Manual:{{PAGENAME}}}}<!-- END: DO NOT EDIT -->
 
 
 
== Workaround: IsComplex[] ==
 
== Workaround: IsComplex[] ==
Sometimes you may want to check if a number is treated as complex number in GeoGebra, as function such as <code>x()</code> and <code>y()</code> do not work with real numbers. As there is no such command as <code>IsComplex</code> you currently have to employ a small trick to check if the number <code>a</code> is complex: <code>complex = IsDefined[sqrt(a) + sqrt(-a)] ∧ (a ≠ 0)</code>.  
+
Sometimes you may want to check if a number is treated as complex number in GeoGebra, as function such as <code>x()</code> and <code>y()</code> do not work with real numbers. As there is no such command as <code>IsComplex</code> you currently have to employ a small trick to check if the number <code>a</code> is complex: <code>complex = IsDefined[sqrt(a) + sqrt(-a)] ∧ (a ≠ 0)</code>.
 
 
 
{{note|1=Complex with imaginary part 0, like <code>a = 2 + 0i</code>, also pass this test. If you just want to check if the imaginary part of a complex number <code>a</code> is not 0 you can use <code>y(a) != 0</code>.}}
 
{{note|1=Complex with imaginary part 0, like <code>a = 2 + 0i</code>, also pass this test. If you just want to check if the imaginary part of a complex number <code>a</code> is not 0 you can use <code>y(a) != 0</code>.}}
  
[[bs:Kompleksni brojevi]]
 
[[ca:Nombres complexos]]
 
[[cs:Komplexní čísla]]
 
[[da:Komplekse tal]]
 
[[de:Komplexe Zahlen]]
 
[[es:Números Complejos]]
 
[[et:Kompleksarvud]]
 
[[fa:اعداد مختلط]]
 
[[fr:Nombres complexes]]
 
[[hr:Kompleksni brojevi]]
 
[[is:Tvinntölur]]
 
[[it:Numeri complessi]]
 
[[kk:Кешен сандар]]
 
[[ko:복소수]]
 
[[lt:Kompleksiniai skaičiai]]
 
[[mk:Комплексен Број]]
 
[[nn:Komplekse tal]]
 
[[pl:Liczby zespolone]]
 
[[sk:Komplexné čísla]]
 
[[sl:Kompleksna števila]]
 
[[tr:Karmaşık Sayılar]]
 
[[zh:複數]]
 

Latest revision as of 07:50, 17 May 2013

Workaround: IsComplex[]

Sometimes you may want to check if a number is treated as complex number in GeoGebra, as function such as x() and y() do not work with real numbers. As there is no such command as IsComplex you currently have to employ a small trick to check if the number a is complex: complex = IsDefined[sqrt(a) + sqrt(-a)] ∧ (a ≠ 0).

Note: Complex with imaginary part 0, like a = 2 + 0i, also pass this test. If you just want to check if the imaginary part of a complex number a is not 0 you can use y(a) != 0.
© 2024 International GeoGebra Institute