Ignore:
Timestamp:
May 15, 2017, 10:08:23 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
22634b2
Parents:
9ebd778
Message:

second attempt at generic rational type with conversions to/from floating point

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/rational

    r9ebd778 r6c6455f  
    1212// Created On       : Wed Apr  6 17:56:25 2016
    1313// Last Modified By : Peter A. Buhr
    14 // Last Modified On : Sun May 14 16:49:13 2017
    15 // Update Count     : 78
     14// Last Modified On : Mon May 15 21:30:12 2017
     15// Update Count     : 90
    1616//
    1717
     
    128128
    129129// conversion
    130 // forall ( otype RationalImpl | arithmetic( RationalImpl ) )
    131 // double widen( Rational(RationalImpl) r );
    132 // forall ( otype RationalImpl | arithmetic( RationalImpl ) )
    133 // Rational(RationalImpl) narrow( double f, RationalImpl md );
     130forall ( otype RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); } )
     131double widen( Rational(RationalImpl) r );
     132forall ( otype RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl );  RationalImpl convert( double );} )
     133Rational(RationalImpl) narrow( double f, RationalImpl md );
    134134
    135135// I/O
Note: See TracChangeset for help on using the changeset viewer.