Changeset 8f8e18 in git for libpolys


Ignore:
Timestamp:
Jul 28, 2017, 11:33:33 AM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
9c8c05991ae275df479287d61b5f9afae8b8fe5c
Parents:
6310b17eabaf8a6adfd0f335e522b7de83ddd648
Message:
more julia.cc stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/juliacf.cc

    r6310b17 r8f8e18  
    3838  jcf_number r=(jcf_number)omAlloc(sizeof(jcf_struct));
    3939  r->val=v;
    40   // ????
     40  // ????: secure v against gc
     41  //       set pos
    4142  return (number)r;
    4243}
     
    4445void jcfFree(jcf_number n,  const coeffs cf)
    4546{
    46   // ???
     47  // ??? undo jcfNew
     48  omFreeSize((ADDRESS)n,sizeof(jcf_struct));
    4749}
    4850
     
    5759
    5860
    59 static BOOLEAN jcfGreaterZero (number k, const coeffs r)
    60 {
     61static BOOLEAN jcfGreaterZero (number a, const coeffs r)
     62{
     63  // this is used in the output of polynomials:
     64  // GreaterZero(a) <=> '+' is required before a monomial start with a
     65  jcf_number aa=(jcf_number)a;
     66  jl_value_t *bb = jl_box_int64(0);
     67  jl_function_t *func = jl_get_function(jl_base_module, ">");
     68  jl_value_t *res=jl_call2(func, aa->val, bb->val);
     69  if (jl_unbox_bool(res)) return TRUE;
     70  else                    return FALSE;
    6171}
    6272
     
    8494}
    8595
    86 static void jcfDelete)(number * a, const coeffs r)
     96static void jcfDelete(number * a, const coeffs r)
    8797{
    8898  jcf_number aa=(jcf_number)(*a);
     
    195205  jl_function_t *func = jl_get_function(jl_base_module, "string");
    196206  jl_value_t *res=jl_call1(func, aa->val);
    197   // ???
     207  // ???: produce the string representaion of a
     208  //      and apply it to StringAppendS
    198209  // char *s=jl_unbox_charptr(res);
    199210  // StringAppendS(s);
Note: See TracChangeset for help on using the changeset viewer.