Skip to content

Commit

Permalink
Fixed _jp_mpz_printf and _jz_mpf_printf
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey M. Hoffstein committed Mar 6, 2012
1 parent a147847 commit c1dbf9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
18 changes: 8 additions & 10 deletions external/gmp_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,18 @@ extern void _jl_mpz_pow_sqrt(mpz_t* rop, mpz_t* op) {
}

extern char* _jl_mpz_printf(mpz_t* rop) {
char** pp;
gmp_asprintf(pp, "%Zd", *rop);
return *pp;
char* pp;
int s = gmp_asprintf(&pp, "%Zd", *rop);
return pp;
}

//// MPF



extern void* _jl_mpf_init()
{
mpf_t* flt = malloc(sizeof(mpf_t));
mpf_init(*integ);
return flot;
mpf_init(*flt);
return flt;
}

extern void _jl_mpf_clear(mpf_t* rop) {
Expand Down Expand Up @@ -127,9 +125,9 @@ extern void _jl_mpf_sqrt(mpf_t* rop, mpf_t* op) {
}

extern char* _jl_mpf_printf(mpf_t* rop) {
char** pp;
gmp_asprintf(pp, "%Zd", *rop);
return *pp;
char* pp;
gmp_asprintf(&pp, "%Zd", *rop);
return pp;
}


Expand Down
1 change: 0 additions & 1 deletion test/bigint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ load ("../jl/bigint.jl")
a=BigInt("123456789012345678901234567890")
b=BigInt("123456789012345678901234567891")


@assert typeof(a+1) == BigInt
@assert a+1 == b
@assert b == a+1
Expand Down

0 comments on commit c1dbf9b

Please sign in to comment.