Changeset 9c8c05 in git for libpolys


Ignore:
Timestamp:
Jul 28, 2017, 12:03:43 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
4639d07e5b8a374973b48216b40dba518c84a822526157566346cbba9a2808e99697dd1f042fe789
Parents:
8f8e18f68489ee23c13c87aa662b7eb3742a961f
Message:
juliacf.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/juliacf.cc

    r8f8e18 r9c8c05  
    128128  jcf_number aa=(jcf_number)a;
    129129  jcf_number bb=(jcf_number)b;
    130   jl_function_t *func = jl_get_function(jl_base_module, "/");
     130  jl_function_t *func = jl_get_function(jl_base_module, "divexact");
    131131  return jcfNew(jl_call2(func, aa->val, bb->val),r);
    132132}
     
    166166  jl_value_t *ii = jl_box_int64(1);
    167167  jcf_number cc=(jcf_number)c;
    168   jl_function_t *func = jl_get_function(jl_base_module, "/");
     168  jl_function_t *func = jl_get_function(jl_base_module, "divexact");
    169169  return jcfNew(jl_call2(func, ii, cc->val),r);
    170170}
     
    182182static BOOLEAN jcfGreater (number a,number b, const coeffs r)
    183183{
     184  // if unsure, define it to "not equal"
    184185  jcf_number aa=(jcf_number)a;
    185186  jcf_number bb=(jcf_number)b;
     
    205206  jl_function_t *func = jl_get_function(jl_base_module, "string");
    206207  jl_value_t *res=jl_call1(func, aa->val);
    207   // ???: produce the string representaion of a
     208  // ???: produce the string representation of a
    208209  //      and apply it to StringAppendS
    209210  // char *s=jl_unbox_charptr(res);
     
    212213
    213214#if 0
     215// optional:
    214216static void jcfPower (number a, int i, number * result, const coeffs r)
    215217{
     
    219221static const char * jcfRead (const char *s, number *a, const coeffs r)
    220222{
     223  // read from s and returns the new position in s,
     224  // if nothing is found, initialize a to 1 and return the original s
     225  // example "2x3y3" -> a=2, s="x3y3"
     226  // example "x" -> a=1, s="x"
     227  // s is anything that Singular recognizes as monomial
    221228  int i=1;
    222229  s=eati(s,&i);
     
    227234static void jcfKillChar(coeffs r)
    228235{
     236 // clean up everything from jcfInitChar
    229237}
    230238
     
    237245static BOOLEAN jcfCoeffIsEqual(const coeffs r, n_coeffType n, void * parameter)
    238246{
     247  return TRUE;
    239248}
    240249
     
    262271static char* jcfCoeffName(const coeffs r)
    263272{
    264   return (char*)"Float()";
     273  return (char*)"juliacf";
    265274}
    266275
    267276BOOLEAN jcfInitChar(coeffs n, void* p)
    268277{
     278  // p may be a pointer to an array known to julia
    269279  n->is_field=TRUE;
    270280  n->is_domain=TRUE;
    271   n->rep=n_rep_float;
    272281
    273282  n->cfKillChar = jcfKillChar;
    274   n->ch = 0;
     283  n->ch = 0; //???
    275284  n->cfCoeffString = jcfCoeffString;
    276285  n->cfCoeffName = jcfCoeffName;
Note: See TracChangeset for help on using the changeset viewer.