/*
 * bignum.h
 *
 *  Created on: Jan 7, 2010
 *      Author: petergoodman
 *     Version: $Id$
 */

#ifndef BIGNUM_H_
#define BIGNUM_H_

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

typedef struct bignum_s *bignum_t;
typedef const struct bignum_s *const_bignum_t;

bignum_t bignum_alloc(const size_t num_digits);
bignum_t bignum_free(const bignum_t num);

bignum_t bignum_zero(const bignum_t num);

bignum_t bignum_add(bignum_t num1, const const_bignum_t num2);
bignum_t bignum_add_uint(bignum_t num1, unsigned int num);

void bignum_fprint(const const_bignum_t num, FILE * const stream);

#endif /* BIGNUM_H_ */

