[4247778] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2019 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // manipulatorsOutput4.cfa -- |
---|
| 5 | // |
---|
| 6 | // Author : Peter A. Buhr |
---|
| 7 | // Created On : Tue Apr 13 17:55:02 2021 |
---|
| 8 | // Last Modified By : Peter A. Buhr |
---|
| 9 | // Last Modified On : Tue Apr 13 18:00:33 2021 |
---|
| 10 | // Update Count : 4 |
---|
| 11 | // |
---|
| 12 | |
---|
| 13 | #include <fstream.hfa> |
---|
| 14 | |
---|
| 15 | int main() { |
---|
| 16 | for ( double w = 1e-27; w < 1e30; w *= 10 ) { |
---|
| 17 | sout | w | eng(w) | sign(eng(w)) | ws(12,5, eng(w) ) | sign(ws(12,5, eng(w) )) | wd(12,5, eng(w) ) | sign(wd(12,5, eng(w) )) | pad0(ws(12,5, eng(w) )) | pad0(sign(ws(12,5, eng(w) ))) | pad0(wd(12,5, eng(w) )) | pad0(sign(wd(12,5, eng(w) ))) |
---|
| 18 | | left(ws(12,5, eng(w) )) | left(sign(ws(12,5, eng(w) ))) | left(wd(12,5, eng(w) )) | left(sign(wd(12,5, eng(w) ))) | left(pad0(ws(12,5, eng(w) ))) | left(pad0(sign(ws(12,5, eng(w) )))) | left(pad0(wd(12,5, eng(w) ))) | left(pad0(sign(wd(12,5, eng(w) )))); |
---|
| 19 | } // for |
---|
| 20 | sout | nl; |
---|
| 21 | |
---|
| 22 | for ( double w = 1e-27; w < 1e30; w *= 42 ) { |
---|
| 23 | sout | w | eng(w) | sign(eng(w)) | ws(12,5, eng(w) ) | sign(ws(12,5, eng(w) )) | wd(12,5, eng(w) ) | sign(wd(12,5, eng(w) )) | pad0(ws(12,5, eng(w) )) | pad0(sign(ws(12,5, eng(w) ))) | pad0(wd(12,5, eng(w) )) | pad0(sign(wd(12,5, eng(w) ))) |
---|
| 24 | | left(ws(12,5, eng(w) )) | left(sign(ws(12,5, eng(w) ))) | left(wd(12,5, eng(w) )) | left(sign(wd(12,5, eng(w) ))) | left(pad0(ws(12,5, eng(w) ))) | left(pad0(sign(ws(12,5, eng(w) )))) | left(pad0(wd(12,5, eng(w) ))) | left(pad0(sign(wd(12,5, eng(w) )))); |
---|
| 25 | } // for |
---|
| 26 | sout | nl; |
---|
| 27 | |
---|
| 28 | for ( double w = 1e-27; w < 1e30; w *= 10 ) { |
---|
| 29 | sout | w | unit(eng(w)) | unit(sign(eng(w))) | unit(ws(12,5, eng(w) )) | unit(sign(ws(12,5, eng(w) ))) | unit(wd(12,5, eng(w) )) | unit(sign(wd(12,5, eng(w) ))) | unit(pad0(ws(12,5, eng(w) ))) | unit(pad0(sign(ws(12,5, eng(w) )))) | unit(pad0(wd(12,5, eng(w) ))) | unit(pad0(sign(wd(12,5, eng(w) )))) |
---|
| 30 | | unit(left(ws(12,5, eng(w) ))) | unit(left(sign(ws(12,5, eng(w) )))) | unit(left(wd(12,5, eng(w) ))) | unit(left(sign(wd(12,5, eng(w) )))) | unit(left(pad0(ws(12,5, eng(w) )))) | unit(left(pad0(sign(ws(12,5, eng(w) ))))) | unit(left(pad0(wd(12,5, eng(w) )))) | unit(left(pad0(sign(wd(12,5, eng(w) ))))); |
---|
| 31 | } // for |
---|
| 32 | sout | nl; |
---|
| 33 | |
---|
| 34 | for ( double w = 1e-27; w < 1e30; w *= 42 ) { |
---|
| 35 | sout | w | unit(eng(w)) | unit(sign(eng(w))) | unit(ws(12,5, eng(w) )) | unit(sign(ws(12,5, eng(w) ))) | unit(wd(12,5, eng(w) )) | unit(sign(wd(12,5, eng(w) ))) | unit(pad0(ws(12,5, eng(w) ))) | unit(pad0(sign(ws(12,5, eng(w) )))) | unit(pad0(wd(12,5, eng(w) ))) | unit(pad0(sign(wd(12,5, eng(w) )))) |
---|
| 36 | | unit(left(ws(12,5, eng(w) ))) | unit(left(sign(ws(12,5, eng(w) )))) | unit(left(wd(12,5, eng(w) ))) | unit(left(sign(wd(12,5, eng(w) )))) | unit(left(pad0(ws(12,5, eng(w) )))) | unit(left(pad0(sign(ws(12,5, eng(w) ))))) | unit(left(pad0(wd(12,5, eng(w) )))) | unit(left(pad0(sign(wd(12,5, eng(w) ))))); |
---|
| 37 | } // for |
---|
| 38 | sout | nl; |
---|
| 39 | |
---|
| 40 | for ( double w = -1e-27; w > -1e30; w *= 42 ) { |
---|
| 41 | sout | w | eng(w) | sign(eng(w)) | ws(12,5, eng(w) ) | sign(ws(12,5, eng(w) )) | wd(12,5, eng(w) ) | sign(wd(12,5, eng(w) )) | pad0(ws(12,5, eng(w) )) | pad0(sign(ws(12,5, eng(w) ))) | pad0(wd(12,5, eng(w) )) | pad0(sign(wd(12,5, eng(w) ))) |
---|
| 42 | | left(ws(12,5, eng(w) )) | left(sign(ws(12,5, eng(w) ))) | left(wd(12,5, eng(w) )) | left(sign(wd(12,5, eng(w) ))) | left(pad0(ws(12,5, eng(w) ))) | left(pad0(sign(ws(12,5, eng(w) )))) | left(pad0(wd(12,5, eng(w) ))) | left(pad0(sign(wd(12,5, eng(w) )))); |
---|
| 43 | } // for |
---|
| 44 | } // main |
---|
| 45 | |
---|
| 46 | // Local Variables: // |
---|
| 47 | // tab-width: 4 // |
---|
| 48 | // compile-command: "cfa -Wall -Wextra manipulatorsOutput4.cfa" // |
---|
| 49 | // End: // |
---|