Changes

Jump to navigation Jump to search
715 bytes added ,  10:28, 25 December 2017
Line 774: Line 774:  
== Floating-Point Behavior ==
 
== Floating-Point Behavior ==
   −
The PICA200 is not IEEE-compliant. It has positive and negative infinities and NaN, but does not seem to have negative 0. Several instructions also have behavior that differs from the IEEE functions. Here are the results from some tests done on hardware:
+
The PICA200 is not IEEE-compliant. It has positive and negative infinities and NaN, but does not seem to have negative 0. Input and output subnormals are flushed to +0. The internal floating point format seems to be the same as used in shader binaries: 1 sign bit, 7 exponent bits, 16 (explicit) mantissa bits. Several instructions also have behavior that differs from the IEEE functions. Here are the results from some tests done on hardware (s = largest subnormal, n = smallest positive normal):
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 876: Line 876:  
|  min(-inf, +inf)
 
|  min(-inf, +inf)
 
|  -inf
 
|  -inf
|   
+
|
 +
 
 +
|- style="border-top: double"
 +
cmp(s, 0)
 +
|  false
 +
|  cmp does not flush input subnormals
 +
|-
 +
|  max(s, 0)
 +
|  s
 +
|  max does not flush input or output subnormals
 +
|-
 +
|  mul(s, 2)
 +
|  0
 +
|  input subnormals are flushed in arithmetic instructions
 +
|-
 +
|  mul(n, 0.5)
 +
|  0
 +
|  output subnormals are flushed in arithmetic instructions
 
|}
 
|}
 +
 +
1.0 can be multiplied 63 times by 0.5 until the result compares equal zero. This is consistent with a 7-bit exponent and output subnormal flushing.
8

edits

Navigation menu