ICEpdf
  1. ICEpdf
  2. PDF-729

Not a number (NaN) error when calculating function 2 result

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.6
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The forum user posted a PDF file that contains two gradient painted shapes. Both gradients had a section of black toward the middle of the gradient. On closer inspection our type 2 function code was returning an NaN when calculating the three colour values from the 1 digit input.

      The NaN is being caused by Math.pow(-1.6, 1.13) which seem a bit strange to me.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #40445 Thu Mar 27 12:26:59 MDT 2014 patrick.corless PDF-729 fixed NaN return value when encountering a negative input.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/Function_2.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #40438 Thu Mar 27 10:18:34 MDT 2014 patrick.corless PDF-729 fixed NaN return value when encountering a negative input.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/functions/Function_2.java

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: