3 Copyright 2004 Free Software Foundation, Inc.
5 This file is part of the GNU MP Library.
7 The GNU MP Library is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
12 The GNU MP Library is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 License for more details.
17 You should have received a copy of the GNU Lesser General Public License
18 along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
32 #define M MP_LIMB_T_MAX
35 mp_limb_t want_dh,want_dl, mh,ml, sh,sl;
46 { 0,0, 0,M-1, 0,M-1 },
47 { 0,1, 0,M-1, 0,M-2 },
50 mp_limb_t got_dh, got_dl;
52 for (i = 0; i < numberof (data); i++)
54 sub_ddmmss (got_dh,got_dl, data[i].mh,data[i].ml, data[i].sh,data[i].sl);
55 if (got_dh != data[i].want_dh || got_dl != data[i].want_dl)
57 printf ("check_data wrong at data[%d]\n", i);
58 mp_limb_trace (" mh", data[i].mh);
59 mp_limb_trace (" ml", data[i].ml);
60 mp_limb_trace (" sh", data[i].sh);
61 mp_limb_trace (" sl", data[i].sl);
62 mp_limb_trace (" want dh", data[i].want_dh);
63 mp_limb_trace (" want dl", data[i].want_dl);
64 mp_limb_trace (" got dh ", got_dh);
65 mp_limb_trace (" got dl ", got_dl);
74 mp_limb_t want_dh,want_dl, got_dh,got_dl, mh,ml, sh,sl;
77 for (i = 0; i < 20; i++)
84 refmpn_sub_ddmmss (&want_dh,&want_dl, mh,ml, sh,sl);
86 sub_ddmmss (got_dh,got_dl, mh,ml, sh,sl);
88 if (got_dh != want_dh || got_dl != want_dl)
90 printf ("check_data wrong at data[%d]\n", i);
91 mp_limb_trace (" mh", mh);
92 mp_limb_trace (" ml", ml);
93 mp_limb_trace (" sh", sh);
94 mp_limb_trace (" sl", sl);
95 mp_limb_trace (" want dh", want_dh);
96 mp_limb_trace (" want dl", want_dl);
97 mp_limb_trace (" got dh ", got_dh);
98 mp_limb_trace (" got dl ", got_dl);