From 3a84aceb203928c5718553bc56cb3648caa3fcb1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 20 Nov 2022 21:33:40 -0800 Subject: expt: zero exponent yields 1.0. * arith.c (expt): NUM-FLNUM, FLNUM-NUM and FLNUM-FLNUM cases ensure that if the expontent is zero, the return value is 1.0. Implementations of pow do this, but ISO C doesn't require it. * txr.1: Now documented. --- txr.1 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index cf6289d3..4e97200a 100644 --- a/txr.1 +++ b/txr.1 @@ -48549,6 +48549,9 @@ operand is converted to a float, and a floating point exponentiation is performed. Exponentiation that would produce a complex number is not supported. +If the exponent is zero, then the return value is 1.0 if at least one operand +is floating-point, otherwise 1. + The .code sqrt function produces a floating-point square root of -- cgit v1.2.3