Changeset 3554


Ignore:
Timestamp:
09/02/03 16:27:01 (19 years ago)
Author:
piso
Message:

NUMERATOR(), DENOMINATOR()

Location:
trunk/j/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Bignum.java

    r3549 r3554  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Bignum.java,v 1.30 2003-09-02 15:07:25 piso Exp $
     5 * $Id: Bignum.java,v 1.31 2003-09-02 16:27:01 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    101101            return this;
    102102        return new Bignum(value.negate());
     103    }
     104
     105    public LispObject NUMERATOR()
     106    {
     107        return this;
     108    }
     109
     110    public LispObject DENOMINATOR()
     111    {
     112        return Fixnum.ONE;
    103113    }
    104114
  • trunk/j/src/org/armedbear/lisp/Fixnum.java

    r3549 r3554  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Fixnum.java,v 1.56 2003-09-02 15:06:53 piso Exp $
     5 * $Id: Fixnum.java,v 1.57 2003-09-02 16:26:47 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    110110            return this;
    111111        return number(-((long)value));
     112    }
     113
     114    public LispObject NUMERATOR()
     115    {
     116        return this;
     117    }
     118
     119    public LispObject DENOMINATOR()
     120    {
     121        return ONE;
    112122    }
    113123
  • trunk/j/src/org/armedbear/lisp/LispObject.java

    r3548 r3554  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispObject.java,v 1.41 2003-09-02 15:06:12 piso Exp $
     5 * $Id: LispObject.java,v 1.42 2003-09-02 16:25:45 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    129129    }
    130130
     131    public LispObject NUMERATOR() throws TypeError
     132    {
     133        throw new TypeError(this, "rational number");
     134    }
     135
     136    public LispObject DENOMINATOR() throws TypeError
     137    {
     138        throw new TypeError(this, "rational number");
     139    }
     140
    131141    public LispObject EVENP() throws TypeError
    132142    {
Note: See TracChangeset for help on using the changeset viewer.