1 /* Copyright (c) 1984 AT&T */
2 /* All Rights Reserved */
6 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
11 * The contents of this file are subject to the terms of the
12 * Common Development and Distribution License, Version 1.0 only
13 * (the "License"). You may not use this file except in compliance
16 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17 * or http://www.opensolaris.org/os/licensing.
18 * See the License for the specific language governing permissions
19 * and limitations under the License.
21 * When distributing Covered Code, include this CDDL HEADER in each
22 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23 * If applicable, add the following below this CDDL HEADER, with the
24 * fields enclosed by brackets "[]" replaced with your own identifying
25 * information: Portions Copyright [yyyy] [name of copyright owner]
30 /* #ident "%Z%%M% %I% %E% SMI" */
34 auto a, b, c, d, e, g, w, y, t, r
39 scale = t + .434*x + 1
80 auto a, b, c, d, e, f, g, u, s, t, r, z
91 scale = scale + scale(x) - length(x) + 1
94 s = s + (length(x)-scale(x))/2 + 1
100 s = s + (length(x)-scale(x))/2 + 1
106 scale = t + length(f) - scale(f) + 1
109 scale = scale + 1.1*length(t) - 1.1*scale(t)
130 auto a, b, c, s, t, y, p, n, i, r
135 s = t + length(y) - scale(y)
141 if(x>=0) n = (x/(2*p)+1)/2
142 if(x<0) n = (x/(2*p)-1)/2
146 scale = t + length(1.2*t) - scale(1.2*t)
151 for(i=3; 1==1; i=i+2){
155 if(c==0){scale=t; ibase = r; return(s/1)}
173 auto a, b, c, d, e, f, g, s, t, r, z
174 if(x==0) {return(0/1)}
178 z =.7853981633974483096156608458198757210492923498437764/1
180 if(scale<52)return(z)
186 x= -(1-sqrt(1.+x*x))/x
191 x = -(1-sqrt(1.+x*x))/x
214 auto a,b,c,d,e,g,i,s,k,t, r
219 k = 1.36*x + 1.16*t - n
220 k = length(k) - scale(k)
221 if(k>0) scale = scale + k