Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base must be binary #87

Closed
CaptainLazarus opened this issue May 21, 2020 · 5 comments
Closed

Base must be binary #87

CaptainLazarus opened this issue May 21, 2020 · 5 comments

Comments

@CaptainLazarus
Copy link

After following all the instruction for installing miracl , I tried running the first sample program for testing and have gotten the following error.
MIRACL error from routine mirsys called from your program Base must be binary (MR_ALWAYS_BINARY defined in mirdef.h ?)

Any idea where I went wrong?

The sample program I'm talking about

#include <stdio.h>
#include "miracl.h"
/* include MIRACL system */

void main()
{ /* calculate factorial of number */
    big nf;
    /* declare "big" variable nf */
    int n;
    miracl *mip=mirsys(5000,10);

    // nf=mirvar(1);

    printf("factorial program\n");
    printf("input number n= \n");
    scanf("%d",&n);
    getchar();
    
    while (n>1)
        premult(nf,n--,nf);

    printf("n!= \n");
    otnum(nf,stdout); /* output result */

}
@mcarrickscott
Copy link
Contributor

mcarrickscott commented May 22, 2020 via email

@CaptainLazarus
Copy link
Author

I followed the instructions given by config.c and changed the generated mirdef.lst to mirdef.h. After that I didn't change anything. Any solutions?

@mcarrickscott
Copy link
Contributor

mcarrickscott commented May 22, 2020 via email

@mcarrickscott
Copy link
Contributor

mcarrickscott commented May 22, 2020 via email

@CaptainLazarus
Copy link
Author

Seemed to work. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants