Code:
#include <math.h>
#include <setjmp.h>
#include <stdio.h>
#include <string.h>#include "../frame.h"
#include "../model2d.h"
static struct token *mesinh()
{
char buf[1024];
float64 numero64;
float64 numf64 = 0.0;
char *message;
message = "Inserisci il valore da passare alla funzione SINH";
numero64 = me_token_number();
numf64 = sinh(numero64);
sprintf(buf,"Sinh(%2.10f)= %2.10f", numero64, numf64);
me_display_prompt(buf);
numf64 = sinh(numero64)-numero64;
return me_append_token(NULL, NUMBER_TOKEN, &numf64 );
}
static struct token *mesin()
{
char buf[1024];
float64 numero64;
float64 numf64 = 0.0;
char *message;
message = "Inserisci il valore da passare alla funzione SIN";
numero64 = me_token_number();
numf64 = sin(numero64);
sprintf(buf,"Sin(%2.10f)= %2.10f", numero64, numf64);
me_display_prompt(buf);
numf64 = sin(numero64)-numero64;
return me_append_token(NULL, NUMBER_TOKEN, &numf64 );
}
void DllExport init_load_init()
{
me_new_arithm_function("SINH", mesinh);
me_new_arithm_function("SIN", mesin);
}