Re: DBA: A math question for you :-)
Posted in 1996
Tim, > The following formula asks for a math function I can't find > on the SunOS machine I'm working on: > datrows = min(255,floor(pageuse/homerow)) ; I don't know if there is a min function like this on SunOS but what they are trying to say here is that datarows is whatever is less, 255 or floor(pageuse/homerow). In code it might be something like this: x = floor(pageuse/homerow) if ( x < 255 ) then datarows = x else datarows = 255 end if > I found the floor and ceiling functions but the "min" is > conspicuously absent. I'm not a math major, so the usage > escapes me. The HP/UX machine doesn't seem to have it either. > And the documentation is not clear what the function is > trying to provide, but that's beside the point. :-) The point is that there are only 255 slots for rows on a page. Even, if more then 255 rows will fit, you will only get 255 > Is there a math formula that would better express this, or > does someone have this min() function? And is this stuff > different for 7.x? Is the min thing even needed? This has not changes in 7.2 Regards - Lester ############################################################################# # Lester Knutsen lester@access.digex.net # # Advanced DataTools Corporation Voice: 703-256-0267 # # Grant group privileges for Informix databases with DB Privileges # # Visit our Web page: http://www.access.digex.net/~lester # # Washington Area Informix User Group: http://www.access.digex.net/~waiug # #############################################################################