mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Issue #55 - Add complex_num_type definition
This commit is contained in:
parent
cb7c208ddf
commit
3c467516c3
2 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
#define CYCLONE_TYPES_H
|
||||
|
||||
#include <math.h>
|
||||
#include <complex.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
@ -55,6 +56,7 @@ enum object_tag {
|
|||
, string_tag // 18
|
||||
, symbol_tag // 19
|
||||
, vector_tag // 20
|
||||
, complex_num_tag // 21
|
||||
};
|
||||
|
||||
#define type_is_pair_prim(clo) \
|
||||
|
@ -676,6 +678,15 @@ typedef struct {
|
|||
#define alloc_bignum(data, p) \
|
||||
bignum_type *p = gc_alloc_bignum((gc_thread_data *)data);
|
||||
|
||||
/**
|
||||
* @brief Complex number
|
||||
*/
|
||||
typedef struct {
|
||||
gc_header_type hdr;
|
||||
tag_type tag;
|
||||
double complex value;
|
||||
} complex_num_type;
|
||||
|
||||
/**
|
||||
* @brief Double-precision floating point type, also known as a flonum.
|
||||
*/
|
||||
|
|
|
@ -53,6 +53,7 @@ const char *tag_names[] = {
|
|||
/*string_tag */ , "string"
|
||||
/*symbol_tag */ , "symbol"
|
||||
/*vector_tag */ , "vector"
|
||||
/*complex_num_tag*/ , "complex number"
|
||||
, "Reserved for future use"
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue