[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1247.0. "Imaginary numbers --> Some Questions" by MSDSWS::FLINN () Thu May 24 1990 17:21

    This note may well be considered as a rather dumb question, but I 
    was wondering if someone could provide some information on 
    imaginary numbers.  The other day I was asked by a customer if Rdb 
    could be used to store a imaginary number.  I told him at the time 
    I wasn't sure primarily due to the fact I wasn't exactly sure of 
    what a imaginary number is.  Being a good DEC employee, I check 
    the notes files and have read a good number of the notes in this 
    conference concerning imaginary numbers.  At this point, I'm still 
    not sure.  I would have posed this question in the Rdb Notes 
    conference, except I'm still wondering what a imaginary number 
    would look like in relation (no pun intended) to the selection of 
    a data type in a Rdb database.
    
    BTW - I should point out that the customer want to use Rdb for a 
    database dealing with engineering data at a large Chemical 
    company.
    
    Thanks,
    Dennis
T.RTitleUserPersonal
Name
DateLines
1247.1Sure it can. Now what's the REAL question. :-)VMSDEV::HALLYBThe Smart Money was on GoliathThu May 24 1990 17:479
    You can think of an imaginary number, more precisley a complex number,
    as a pair of real numbers.
    
    Perhaps the real question the customer meant was:  does CDD contain the
    built-in datatype COMPLEX?
    
    Maybe a bit of reading in the FORTRAN manuals would help you.
    
      John
1247.2Complex numbers are simpleJRDV04::BISHOPKokusaijinThu May 24 1990 20:4230
What makes a real number real is the way you use it.  We define the familiar
operations on real numbers -- addition, multiplication, reciprocation, etc.,
because the numbers together with those operations make a system that is a 
useful tool for problems in everyday life*.  Similarly, operations for imaginary
numbers have been devised to follow certain rules of logic, and they have been
found to be useful in science, engineering, etc.  What distinguishes 
imaginary numbers, or in general, complex numbers, from real numbers is the 
way they are used in operations.  

For example, the imaginary number i is stored in a computer as 1.  The user 
(programmer) must also indicate somehow that this is imaginary, such as by 
making it the second entry in a structure of two real numbers.  S/he then 
makes sure that whenever this number is used it follows the rules for imaginary 
numbers.

Thus, when a real 1 is squared, the result is 1.  However, if a 1 that repre-
sents an imaginary component is squared, the program must recognize it as 
imaginary, and give the answer -1.

Thats a long winded way of saying "Yes, Rdb can store imaginary numbers.  It is
up to the application to process them properly."  However, as .-1 said, it is a
lot easier if there are some built in structures that keep complex numbers org-
anized as an ordered pair (x,y), with x representing the real part and y the
imaginary part.  I don't know if this is the case.



*Purists, don't jump on me for this statement.  Some would argue that we defined
the operations the way we did because it was logical.  Lets debate this 
elsewhere. I said this here because it makes the explanation easier.
1247.3how to do it in RdbCSSE::NEILSENI used to be PULSAR::WALLYFri May 25 1990 13:358
Rdb does not have a complex datatype.

The user can define a real part and an imaginary part as, for example,
FLOAT datatype.  Like AMPLITUDE_REAL and AMPLITUDE_IMAGINARY.

Then it is up to the application code to convert them
to a COMPLEX datatype when necessary.

1247.4A very little math humor on a preholiday Friday afternoon.VMSDEV::HALLYBThe Smart Money was on GoliathFri May 25 1990 14:1211
  Rdb has no COMPLEX datatype, eh?
  Is this why we have a salary freeze?
    
  Your salary comes in two parts:  what you are currently getting (that is,
  the real part) and your salary increase this year (the imaginary part :-).
    
  But if the database doesn't support it and the application has to
  synthesize them, why perhaps DEC just couldn't convert its internal
  payroll system when they switched over to Rdb.  That explains a lot.
    
      John
1247.5imaginary vs complexSUBWAY::TJIONASGeorge Tjionas - NY PSSFri May 25 1990 16:5642
    Need more clarifications ? (some people might). A mathematician might
    say:
    
    Definition:  Lets use the notation i to define the Square root of -1,
    so i**2 = -1.
    
    Lets use the symbol R for the set of real numbers. Then:
    
    Definition: An imaginary number is defined to be the product i*r which
    briefly stated as ix where x belongs in R (x is element from set R).
    
    Definition: A complex number is defined to be the following expresion:
    
                x op1 i op2 y       examples: 3 + i5, 2 - i8 etc.
    
    where op1 is + or -  (addition or subtraction operator)
     and  op2 is * or /  (multiplication or divition operator)
          x and y are real numbers (from the set R)
          x   is called the real part
          i op2 y is the imaginary part.
    
    C is the symbol for the set of complex numbers of the above form
    C is equivalent to R op1 i op2 R set if defined properly.
    Since there cannot be a graphical replesentation SQRT(-1) you are only
    imaging it, so computers can not represent that non-real value but
    only make conventional rules of how to represent it with dumies (e.g. 1).
    The association of a complex number (not imaginary) to an ordered
    pair (x, y) is only convensional with + and * as the default
    operators to map R+iR = { (x, y)|x, y such that x + iy } set elements. 
    As you see there is a difference between imaginary numbers and complex
    numbers. An imaginary number is always a complex number, but a complex
    number is more than an imaginary number. In different words, an
    imaginary number is a monomial expresion where as a complex number is
    a polynamial type of expresion. That's why the complex arithmetic is
    defined as operations over polynomials, e.g.
    
    (a + ib) + (x + iy) = (a + x) + i(b + y) for addition of complex #s
    (a + ib) * (x + iy) = (ax - by) + i(ay + bx) for multiplication of
    complex numbers (recall that i**2 = -1).
    similarly for the other operations.
    
    That's all for non-mathematicians.