[gs-cvs] rev 7139 - trunk/gs/src
lpd at ghostscript.com
lpd at ghostscript.com
Mon Oct 30 20:29:18 PST 2006
Author: lpd
Date: 2006-10-30 20:29:18 -0800 (Mon, 30 Oct 2006)
New Revision: 7139
Modified:
trunk/gs/src/zmath.c
Log:
Makes 0 0 exp return 1.0 rather than signalling undefinedresult, to match
Adobe interpreters. Fixes a discrepancy in PS3 CET 25-07-1.
Modified: trunk/gs/src/zmath.c
===================================================================
--- trunk/gs/src/zmath.c 2006-10-30 22:20:55 UTC (rev 7138)
+++ trunk/gs/src/zmath.c 2006-10-31 04:29:18 UTC (rev 7139)
@@ -147,11 +147,12 @@
if (code < 0)
return code;
- if (args[0] == 0.0 && args[1] == 0.0)
- return_error(e_undefinedresult);
if (args[0] < 0.0 && modf(args[1], &ipart) != 0.0)
return_error(e_undefinedresult);
- result = pow(args[0], args[1]);
+ if (args[0] == 0.0 && args[1] == 0.0)
+ result = 1.0; /* match Adobe; can't rely on C library */
+ else
+ result = pow(args[0], args[1]);
make_real(op - 1, result);
pop(1);
return 0;
More information about the gs-cvs
mailing list