RosettaCodeData/Task/Zero-to-the-zero-power/Cache-ObjectScript/zero-to-the-zero-power.cos

11 lines
257 B
Plaintext

ZEROPOW
// default behavior is incorrect:
set (x,y) = 0
w !,"0 to the 0th power (wrong): "_(x**y) ; will output 0
// if one or both of the values is a double, this works
set (x,y) = $DOUBLE(0)
w !,"0 to the 0th power (right): "_(x**y)
quit