OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [rational_arithmetic.ads] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
package Rational_Arithmetic is
2
  -- Whole numbers
3
  type Whole is new Integer;
4
--
5
  -- Undefine unwanted operations
6
  function "/" (Left, Right: Whole) return Whole is abstract;
7
--
8
  -- Rational numbers
9
--
10
  type Rational is private;
11
--
12
  -- Constructors
13
--
14
  function "/" (Left, Right: Whole) return Rational;
15
--
16
  -- Rational operations
17
--
18
  function "-" (Left, Right: Rational) return Rational;
19
--
20
  -- Mixed operations
21
--
22
  function "+" (Left: Whole   ; Right: Rational) return Rational;
23
  function "-" (Left: Whole   ; Right: Rational) return Rational;
24
  function "-" (Left: Rational; Right: Whole   ) return Rational;
25
  function "/" (Left: Whole   ; Right: Rational) return Rational;
26
  function "*" (Left: Whole   ; Right: Rational) return Rational;
27
  function "*" (Left: Rational; Right: Whole   ) return Rational;
28
--
29
  -- Relational
30
--
31
  function "=" (Left: Rational; Right: Whole) return Boolean;
32
--
33
private
34
  type Rational is record
35
    Numerator, Denominator: Whole;
36
  end record;
37
end Rational_Arithmetic;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.