WG15 Defect Report Ref: 9945-2-77
Topic: bc - scale


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-77

 _____________________________________________________________________________

	Topic:			bc - scale
	Relevant Sections:	4.3.7.1


Defect Report:
-----------------------
Date: Wed, 7 Sep 1994 15:50:34 -0700
From: Fred Zlotnick <fred@mindcraft.com>


I would like to an request official, binding interpretation from the
WG15 concerning the following point in ISO/IEC 9945-2:1993 (POSIX.2).

POSIX.2 Subclause 4.3 specifies the semantics of the "bc" utility.  In
subclause 4.3.7.1, lines 1570-1571 state:

	The scale of an invocation of each of these functions shall
	be the scale of the value of the scale register when the
	function is invoked.

The functions referred to are the math functions s(), c(), a(), l(),
e() and j().

Suppose that bc is invoked with the -l flag, and that the scale is 20.
What is the value of the expression

	scale(a(0))

On the one hand, the sentence quoted above implies that it should be
20.  On the other hand, the value of a(0) is exactly 0, and the scale
of 0 is 0.

Thank you for your attention to this matter.

Interpretation response:
-------------------------


The specification on lines 1570-1573, page 196 is talking about the scale 
used while computing the value of the arctangent, not about the computed 
arctangent, since arctangent (0) is zero, scale(a(0)) is equivilent to 
scale(0) which is zero.

The standard clearly states the behaviour for bc and scale(), and conforming 
implementations must conform to this.


Rationale
-------------
None.

Forwarded to Interpretations group: 18 Sep 94

Proposed resolution sent for review: 19th Nov 94
Resolved: 10th Dec 94