diff --git a/src/peano.c b/src/peano.c index 9e5b1e2..b01a951 100644 --- a/src/peano.c +++ b/src/peano.c @@ -39,15 +39,15 @@ lisp_add( struct stack_frame *frame, struct cons_pointer env ) { bool is_int = true; for ( int i = 0; i < args_in_frame && !nilp( frame->arg[i] ); i++ ) { - struct cons_space_object arg = pointer2cell( frame->arg[i] ); + struct cons_space_object current = pointer2cell( frame->arg[i] ); - switch ( arg.tag.value ) { + switch ( current.tag.value ) { case INTEGERTV: - i_accumulator += arg.payload.integer.value; + i_accumulator += current.payload.integer.value; d_accumulator += numeric_value( frame->arg[i] ); break; case REALTV: - d_accumulator += arg.payload.real.value; + d_accumulator += current.payload.real.value; is_int = false; default: lisp_throw( c_string_to_lisp_string( "Cannot add: not a number" ), diff --git a/src/real.h b/src/real.h index 7e3601f..6e4ed53 100644 --- a/src/real.h +++ b/src/real.h @@ -24,7 +24,7 @@ extern "C" { * @param value the value to wrap; * @return a real number cell wrapping this value. */ - struct cons_pointer make_real( double value ); + struct cons_pointer make_real( long double value ); #ifdef __cplusplus }