Skip to content

expt must pop stack #1

@dcurrie

Description

@dcurrie

The expt function does not manage the stack correctly. This fixes it for me:

static void primop_expt(long arg) {
	double tmp = the_double(1,sp[0]);
	tmp = pow(tmp,the_double(2,sp[1]));
	*++sp = make_flonum(tmp);
}

Note the addition of ++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions