Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - get ring precision (number of digits) value
Author Message
  Post subject:  Re: get ring precision (number of digits) value  Reply with quote
Apologies if I misunderstood your question,
If you want to recover details of declared ring, use ringlist command. For example,

Code:
ring r = (real,55,57),x,dp;
ringlist(r);  //Displays information regarding current ring as array of arrays.

Now,
int R_digits =ringlist(r)[1][2][1];     //55
int R_restdigits = ringlist(r)[1][2][2];    //57
Post Posted: Wed Aug 03, 2016 1:49 pm
  Post subject:  get ring precision (number of digits) value  Reply with quote
assuming that somewhere a ring is declared (by ot hers), lets say

Code:
ring R = (real,55,57),x,dp;


is there a Singular function to get the number of digits like

Code:
int R_digits ;
int R_restdigits;
R_digits = digits(R);
R_restdigits = restdigits(R);


?
Post Posted: Sun Jul 31, 2016 2:39 pm


It is currently Fri May 13, 2022 10:56 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group