CVS difference for ai12s/ai12-0125-3.txt

Differences between 1.10 and version 1.11
Log of other versions for file ai12s/ai12-0125-3.txt

--- ai12s/ai12-0125-3.txt	2016/08/19 03:03:15	1.10
+++ ai12s/ai12-0125-3.txt	2016/08/20 00:04:58	1.11
@@ -1,4 +1,4 @@
-!standard 5.2.1(0)                                 16-08-18  AI12-0125-3/06
+!standard 5.2.1(0)                                 16-08-19  AI12-0125-3/07
 !standard 2.2(9)
 !standard 3.3(21.1/3)
 !standard 4.1(2/3)
@@ -134,7 +134,7 @@
     ...
     -- Square the element in the Count (see 3.3.1) position:
     My_Complex_Array (Count) := (Re => @.Re**2 - @.Im**2,
-                                 Im => -2.0 * @.Re * @.Im);
+                                 Im => 2.0 * @.Re * @.Im);
        -- A target_name can be used multiple times and as a prefix if needed.
 
 
@@ -437,10 +437,10 @@
                        -- @ft<@i<(Board is declared in 3.6.1).>>>
 
 @xcode<My_Complex_Array : @b<array> (1 .. Max) @b<of> Complex; -- @ft<@i<See 3.3.2, 3.8.>>
-    ...
-    -- @ft<@i<Square the element in the Count (see 3.3.1) position:>>
-    My_Complex_Array (Count) := (Re => @@.Re**2 - @@.Im**2,
-                                 Im => -2.0 * @@.Re * @@.Im);
+...
+-- @ft<@i<Square the element in the Count (see 3.3.1) position:>>
+My_Complex_Array (Count) := (Re =@> @@.Re**2 - @@.Im**2,
+                             Im =@> 2.0 * @@.Re * @@.Im);
    -- @ft<@i<A target_name can be used multiple times and as a prefix if needed.>>>
 
 !corrigendum 8.6(9/4)
@@ -453,7 +453,7 @@
 
 !ASIS
 
-** TBD **
+Some query is needed, details to follow.
 
 !ACATS Tests
 
@@ -3552,3 +3552,39 @@
 
 ****************************************************************
 
+From: Jeff Cousins
+Sent: Friday, August 19, 2016  2:20 AM
+
+Thanks. But is A actually correct? Why did I put a - before the 2.0?
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Friday, August 19, 2016  2:43 PM
+
+After wasting 20 minutes reading articles about complex numbers, I've concluded
+that you are right that you are wrong. :-)
+
+Wikipedia gives the formula for multiplication as:
+
+  (a + bi)*(c + di) = (ac - bd) + (ad + bc)i
+
+If a = c and b = d, then we get
+   a**2 - b**2 + 2.0*a*b*I
+
+So you have an extra minus sign in your example.
+
+(Most of the hits I got to the query "square complex number" finds articles about
+something called an "absolute square" which is something different -- it's real
+valued (not complex).)
+
+I'll fix this.
+
+****************************************************************
+
+From: Jeff Cousins
+Sent: Friday, August 19, 2016  3:01 PM
+
+Thanks Randy. Maybe we should all go back to school to revise our math(s)!
+
+****************************************************************

Questions? Ask the ACAA Technical Agent