From 62665bb2942152e023cec00387912a2f7b00ed4a Mon Sep 17 00:00:00 2001 From: Chris Lesiak Date: Tue, 22 Mar 2016 10:26:04 -0500 Subject: [PATCH] Fix Errors in Why Homogeneous Systems The FAQ entry on homogeneous systems asks the reader to consider the following: cout << sin(asin(180.0 * degrees)); There are two problems with this: 1. It won't compile because asin does not take an angle. 2. Even with the order of asin and sin swapped, the example is confusing because it isn't clear if the results should be 180 degrees, or 0 degrees. Improve the explanation by swapping sin and asin and using 90 degrees. --- doc/units.qbk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/units.qbk b/doc/units.qbk index 618212f..0c7345f 100644 --- a/doc/units.qbk +++ b/doc/units.qbk @@ -1204,11 +1204,11 @@ radians instead...) Consider the following code: - cout << sin(asin(180.0 * degrees)); + cout << asin(sin(90.0 * degrees)); What should this print? If only heterogeneous -systems are available it would print 3.14159+ rad -Why? Well, `asin` would return a `quantity` +systems are available it would print 1.5708 rad +Why? Well, `sin` would return a `quantity` effectively losing the information that degrees are being used. In order to propogate this extra information we need homogeneous systems. -- 2.4.3