Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#to_sollyaObject



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'ext/sollya_rb.c', line 309

static VALUE sollyarb_symbol_to_sollya(VALUE self)
{
  ID id = rb_sym2id(self);
  if (id == id_on) {
    return sollyarb_cst_ON;
  } else if (id == id_off) {
    return sollyarb_cst_OFF;
  } else if (id == id_dyadic) {
    return sollyarb_cst_DYADIC;
  } else if (id == id_powers) {
    return sollyarb_cst_POWERS;
  } else if (id == id_binary) {
    return sollyarb_cst_BINARY;
  } else if (id == id_hexadecimal) {
    return sollyarb_cst_HEXADECIMAL;
  } else if (id == id_file) {
    return sollyarb_cst_FILE;
  } else if (id == id_postscript) {
    return sollyarb_cst_POSTSCRIPT;
  } else if (id == id_postscriptfile) {
    return sollyarb_cst_POSTSCRIPTFILE;
  } else if (id == id_perturb) {
    return sollyarb_cst_PERTURB;
  } else if (id == id_RD || id == id_round_down) {
    return sollyarb_cst_ROUND_DOWN;
  } else if (id == id_RU || id == id_round_up) {
    return sollyarb_cst_ROUND_UP;
  } else if (id == id_RZ || id == id_round_towards_zero) {
    return sollyarb_cst_ROUND_TOWARDS_ZERO;
  } else if (id == id_RN || id == id_round_to_nearest) {
    return sollyarb_cst_ROUND_TO_NEAREST;
  } else if (id == id_honorcoeffprec) {
    return sollyarb_cst_HONORCOEFFPREC;
  } else if (id == id_true) {
    return sollyarb_cst_TRUE;
  } else if (id == id_false) {
    return sollyarb_cst_FALSE;
  } else if (id == id_void) {
    return sollyarb_cst_VOID;
  } else if (id == id_default) {
    return sollyarb_cst_DEFAULT;
  } else if (id == id_decimal) {
    return sollyarb_cst_DECIMAL;
  } else if (id == id_absolute) {
    return sollyarb_cst_ABSOLUTE;
  } else if (id == id_relative) {
    return sollyarb_cst_RELATIVE;
  } else if (id == id_fixed) {
    return sollyarb_cst_FIXED;
  } else if (id == id_floating) {
    return sollyarb_cst_FLOATING;
  } else if (id == id_error) {
    return sollyarb_cst_ERROR;
  } else if (id == id_D || id == id_double) {
    return sollyarb_cst_DOUBLE;
  } else if (id == id_SG || id == id_single) {
    return sollyarb_cst_SINGLE;
  } else if (id == id_QD || id == id_quad) {
    return sollyarb_cst_QUAD;
  } else if (id == id_HP || id == id_halfprecision) {
    return sollyarb_cst_HALFPRECISION;
  } else if (id == id_DE || id == id_doubleextended) {
    return sollyarb_cst_DOUBLEEXTENDED;
  } else if (id == id_DD || id == id_doubledouble) {
    return sollyarb_cst_DOUBLE_DOUBLE;
  } else if (id == id_TD || id == id_tripledouble) {
    return sollyarb_cst_TRIPLE_DOUBLE;
  } else {
    rb_raise(rb_eArgError, "cannot convert symbol %" PRIsVALUE " into a Sollya object", self);
  }
}