Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-13271

nan value inconsistency

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Timed Out
    • 5.0.6
    • None
    • Code Generator
    • ubuntu 14.04

    Description

      rec:=record
      string id;
      real val;
      end;
      ds:=dataset([

      {'a',1}

      ,

      {'b',-2}

      ],rec);

      ds2:=project(ds,transform(recordof(ds),self.val:=left.val/power(left.val,0.5),self:=left));
      output(ds2);

      The val for -2 outputs -nan when used in a dataset.

      Alternately,
      //real val2:=-2/power(-2,0.5);
      //output(val2);
      But when the expression is used as a definition it gives compile time error.
      Consistency is missing and a macro like isNaN is not present to check for nan.

      Attachments

        Activity

          People

            ghalliday Gavin Halliday
            ankityadav3loq Ankit Yadav (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: