File indexing completed on 2026-11-07 10:15:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef CALCIUM_H
0013 #define CALCIUM_H
0014
0015 #ifdef CALCIUM_INLINES_C
0016 #define CALCIUM_INLINE
0017 #else
0018 #define CALCIUM_INLINE static inline
0019 #endif
0020
0021 #include "acb_types.h"
0022 #include "ca_types.h"
0023
0024 #ifdef __cplusplus
0025 extern "C" {
0026 #endif
0027
0028
0029
0030 #ifdef FLINT_HAVE_FILE
0031 void calcium_stream_init_file(calcium_stream_t out, FILE * fp);
0032 #endif
0033
0034 CALCIUM_INLINE
0035 void calcium_stream_init_str(calcium_stream_t out)
0036 {
0037 out->fp = NULL;
0038 out->s = (char *) flint_malloc(16);
0039 out->s[0] = '\0';
0040 out->len = 0;
0041 out->alloc = 16;
0042 }
0043
0044 void calcium_write(calcium_stream_t out, const char * s);
0045 void calcium_write_si(calcium_stream_t out, slong x);
0046 void calcium_write_fmpz(calcium_stream_t out, const fmpz_t c);
0047 void calcium_write_arb(calcium_stream_t out, const arb_t x, slong digits, ulong flags);
0048 void calcium_write_acb(calcium_stream_t out, const acb_t z, slong digits, ulong flags);
0049
0050 CALCIUM_INLINE
0051 void calcium_write_free(calcium_stream_t out, char * s)
0052 {
0053 calcium_write(out, s);
0054 flint_free(s);
0055 }
0056
0057
0058
0059
0060 CALCIUM_INLINE void truth_print(truth_t t)
0061 {
0062 if (t == T_TRUE) flint_printf("T_TRUE");
0063 if (t == T_FALSE) flint_printf("T_FALSE");
0064 if (t == T_UNKNOWN) flint_printf("T_UNKNOWN");
0065 }
0066
0067 const char * calcium_func_name(calcium_func_code func);
0068
0069
0070
0071 ulong calcium_fmpz_hash(const fmpz_t x);
0072
0073 #ifdef __cplusplus
0074 }
0075 #endif
0076
0077 #endif