The R Project SVN R

Rev

Rev 64656 | Rev 68947 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 64656 Rev 64658
Line 25... Line 25...
25
 
25
 
26
#include <Defn.h>
26
#include <Defn.h>
27
#include <float.h>  /* for DBL_MAX */
27
#include <float.h>  /* for DBL_MAX */
28
#include <Graphics.h>
28
#include <Graphics.h>
29
#include <Print.h>
29
#include <Print.h>
30
#include <Rmath.h> // for exp10, imax2
30
#include <Rmath.h> // for Rexp10, imax2
31
 
31
 
32
/* used in graphics and grid */
32
/* used in graphics and grid */
33
SEXP CreateAtVector(double *axp, double *usr, int nint, Rboolean logflag)
33
SEXP CreateAtVector(double *axp, double *usr, int nint, Rboolean logflag)
34
{
34
{
35
/*	Create an  'at = ...' vector for  axis(.)
35
/*	Create an  'at = ...' vector for  axis(.)
Line 107... Line 107...
107
	    if (ne < 1)
107
	    if (ne < 1)
108
		error("log - axis(), 'at' creation, _LARGE_ range: "
108
		error("log - axis(), 'at' creation, _LARGE_ range: "
109
		      "ne = %d <= 0 !!\n"
109
		      "ne = %d <= 0 !!\n"
110
		      "\t axp[0:1]=(%g,%g) ==> i = %d;	nint = %d",
110
		      "\t axp[0:1]=(%g,%g) ==> i = %d;	nint = %d",
111
		      ne, axp[0],axp[1], i, nint);
111
		      ne, axp[0],axp[1], i, nint);
112
	    rng = exp10((double)ne); /* >= 10 */
112
	    rng = Rexp10((double)ne); /* >= 10 */
113
	    n = 0;
113
	    n = 0;
114
	    while (dn < umax) {
114
	    while (dn < umax) {
115
		n++;
115
		n++;
116
		dn *= rng;
116
		dn *= rng;
117
	    }
117
	    }