added stdlib for atof()

This commit is contained in:
Krishna Vedala 2020-06-10 12:26:48 -04:00
parent 57f4f5e2f6
commit 4979f68c24
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define order 2 /**< number of dependent variables in ::problem */
@ -83,7 +84,7 @@ void forward_euler(double dx, double *x, double *y, double *dy)
*/
int main(int argc, char *argv[])
{
double X0 = 0.f; /* initial value of f(x = x0) */
double X0 = 0.f; /* initial value of x0 */
double Y0[] = {1.f, 0.f}; /* initial value Y = y(x = x_0) */
double dx, dy[order];

View File

@ -28,6 +28,7 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define order 2 /**< number of dependent variables in ::problem */
@ -91,7 +92,7 @@ void midpoint_euler(double dx, double *x, double *y, double *dy)
*/
int main(int argc, char *argv[])
{
double X0 = 0.f; /* initial value of f(x = x0) */
double X0 = 0.f; /* initial value of x0 */
double Y0[] = {1.f, 0.f}; /* initial value Y = y(x = x_0) */
double dx, dy[order];