Linear Algebra and the C Language/a0e8
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do{
clrscrn();
printf(" Decimal numbers: \n");
printf(" r_E(999, 1e-3): %+0.3f\n\n\n", r_E(999, 1e-3));
printf(" Scientific Notation : %%+0.3E ... \%%+0.3e \n\n");
printf(" Positive and negative numbers: \n");
printf(" r_E(999, 1e-3): %+0.3e \n", r_E(999, 1e-3));
printf(" r_E(999, 1E+3): %+0.3E\n\n\n", r_E(999, 1E+3));
printf(" Positive numbers: \n");
printf(" rp_E(999, 1e-3): %+0.3e \n", rp_E(999, 1e-3));
printf(" rp_E(999, 1E+3): %+0.3E\n\n\n", rp_E(999, 1E+3));
}while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
Decimal numbers:
r_E(999, 1e-3): +0.183
Scientific Notation : %+0.3E ... %+0.3e
Positive and negative numbers:
r_E(999, 1e-3): -4.940e-01
r_E(999, 1E+3): +8.880E+05
Positive numbers:
rp_E(999, 1e-3): +8.070e-01
rp_E(999, 1E+3): +8.360E+05
Press return to continue
Press X return to stop