[cfp-interest 3754] Re: Minus signs and hyphens

Mike Cowlishaw mfc at speleotrove.com
Wed Jan 7 13:09:04 PST 2026


And for those who maybe unaware of the subtleties of such things, I put together this:

 

  https://speleotrove.com/decimal/decifaq2.html#minuses

 

forty or so years ago (copied to the  URL above 25 years ago).

 

Mike

 

 

From: cfp-interest On Behalf Of Jim Thomas
Sent: 03 January 2026 17:47
To: CFP <cfp-interest at ucbtest.org>
Subject: [cfp-interest 3751] Minus signs and hyphens

 

Use of minus signs vs hyphens has been a continuing issue in math and floating-point specification in C documents. This note is based on off line discussion about this issue in the Annex F Special Cases proposal. In the current version of the proposal linked from https://wiki.edg.com/pub/CFP/WebHome/C2Y-F-SpecialCases-20251030.pdf, the cases mentioned in this note are correct (per comments below). This note is just to document off line discussion. C references are to N3685.

 

The basic idea is to use minus signs for value negation and to use hyphens for the C unary - and subtraction operators. The minus sign is a mathematical symbol, the hyphen is a C language element.

 

The purpose of the first bullet -0- for atan2 is to state an equivalence property of the C atan2 function, not an equivalence of C expressions per se. We’re saying an evaluation of the C expression composing the unary - operator and the C atan2 function is equivalent, WRT result value and side effects, to the evaluation of the C atan2 function but with the value of the first argument negated. 

 

The unary - operator is properly represented by a hyphen. Use of a minus sign (value negation) would indicate that the statement to be just about values.

 

The value negation for the first argument is properly represented by a minus sign. 

 

Similarly for atan2pi.

 

- Jim Thomas

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20260107/7ff57562/attachment.htm>


More information about the cfp-interest mailing list