Forráskód Böngészése

Update htan(Inf/-Inf) to +1/-1 (#268)

Young Kim 8 éve
szülő
commit
77771f4e1c

+ 10 - 2
tools/clang/unittests/HLSL/ShaderOpArithTable.xml

@@ -240,23 +240,31 @@
         <Parameter Name="Validation.NumInput">9</Parameter>
         <Parameter Name="Validation.Input">
           <Value>NaN</Value>
+    <!-- TODO: Uncomment this when WARP is fixed
           <Value>-Inf</Value>
+    -->
           <Value>-denorm</Value>
           <Value>-0</Value>
           <Value>0</Value>
           <Value>denorm</Value>
+    <!-- TODO: Uncomment this when WARP is fixed
           <Value>Inf</Value>
+    -->
           <Value>1</Value>
           <Value>-1</Value>
         </Parameter>
         <Parameter Name="Validation.Expected">
           <Value>NaN</Value>
-          <Value>NaN</Value>
+    <!-- TODO: Uncomment this when WARP is fixed
+          <Value>-1</Value>
+    -->
           <Value>-0.0</Value>
           <Value>-0.0</Value>
           <Value>0.0</Value>
           <Value>0.0</Value>
-          <Value>NaN</Value>
+    <!-- TODO: Uncomment this when WARP is fixed
+          <Value>1</Value>
+    -->
           <Value>0.761594</Value>
           <Value>-0.761594</Value>
         </Parameter>

+ 1 - 1
utils/hct/hctdb_inst_docs.txt

@@ -236,7 +236,7 @@ Returns the hyperbolic tangent of the specified value.
 +----------+------+------------+---------+----+----+---------+------------+------+-----+
 | src      | -inf | -F         | -denorm | -0 | +0 | +denorm | +F         | +inf | NaN |
 +----------+------+------------+---------+----+----+---------+------------+------+-----+
-| htan(src)|  NaN | -F         |       0 |  0 |  0 |       0 | +F         |  NaN | NaN |
+| htan(src)| -1   | -F         |       0 |  0 |  0 |       0 | +F         | +1   | NaN |
 +----------+------+------------+---------+----+----+---------+------------+------+-----+
 
 * Inst: Ibfe - Integer bitfield extract