Changeset 373


Ignore:
Timestamp:
Jan 5, 2015, 8:53:08 AM (6 years ago)
Author:
Maxim Reznik
Message:

Fix regressions

Allow negative exponents in numeric literals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/arithmetic/gela-arithmetic-integers.adb

    r372 r373  
    209209      end loop;
    210210
    211       return To_Value (Result_Text (1 .. Result_Last));
     211      return To_Value (Result_Text (0 .. Result_Last));
    212212   end "**";
    213213
     
    412412      Left_Last := Get_Last (Left_Text);
    413413
    414       return To_Value (Left_Text (1 .. Left_Last));
     414      return To_Value (Left_Text (0 .. Left_Last));
    415415   end "not";
    416416
     
    925925      Result := Simple_Literal (Text (Sharp + 1 .. E - 1), Base);
    926926
    927       if Exp /= Zero then
     927      if Exp > Zero then
    928928         Exp := Base_V ** Exp;
    929929         Result := Result * Exp;
     930      elsif Exp < Zero then
     931         Exp := Base_V ** (-Exp);
     932         Result := Result / Exp;
    930933      end if;
    931934
Note: See TracChangeset for help on using the changeset viewer.