Changeset cdbab55 for tests/gmp.c
- Timestamp:
- Aug 21, 2018, 2:24:29 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 2a6292d
- Parents:
- 2b79a70 (diff), efa8b6a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
tests/gmp.c (moved) (moved from src/tests/gmp.c ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/gmp.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // gmp.c -- 8 // 6 // 7 // gmp.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Apr 19 08:55:51 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Sep 28 18:33:51 201713 // Update Count : 55 514 // 12 // Last Modified On : Sat Aug 18 12:43:13 2018 13 // Update Count : 556 14 // 15 15 16 16 // NOTE: UBUNTU DOES NOT SUPPORT GMP MULTILIB, SO ONLY 64-BIT GMP IS TESTED. 17 17 18 #include <gmp >18 #include <gmp.hfa> 19 19 20 20 int main( void ) { … … 89 89 fn = 1; fn2 = fn1; fn1 = fn; // 2nd case 90 90 sout | 1 | fn | endl; 91 for ( unsigned int i = 2; i <= 200; i += 1) {91 for ( i; 2u ~= 200 ) { 92 92 fn = fn1 + fn2; fn2 = fn1; fn1 = fn; // general case 93 93 sout | i | fn | endl; … … 99 99 Int fact = 1; // 1st case 100 100 sout | (int)0 | fact | endl; 101 for ( unsigned int i = 1; i <= 40; i += 1) {101 for ( i; 1u ~= 40u ) { 102 102 fact *= i; // general case 103 103 sout | i | fact | endl;
Note:
See TracChangeset
for help on using the changeset viewer.