1355604Sdelphij/*
2355604Sdelphij * CDDL HEADER START
3355604Sdelphij *
4355604Sdelphij * The contents of this file are subject to the terms of the
5355604Sdelphij * Common Development and Distribution License (the "License").
6355604Sdelphij * You may not use this file except in compliance with the License.
7355604Sdelphij *
8355604Sdelphij * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9355604Sdelphij * or http://www.opensolaris.org/os/licensing.
10355604Sdelphij * See the License for the specific language governing permissions
11355604Sdelphij * and limitations under the License.
12355604Sdelphij *
13355604Sdelphij * When distributing Covered Code, include this CDDL HEADER in each
14355604Sdelphij * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15355604Sdelphij * If applicable, add the following below this CDDL HEADER, with the
16355604Sdelphij * fields enclosed by brackets "[]" replaced with your own identifying
17355604Sdelphij * information: Portions Copyright [yyyy] [name of copyright owner]
18355604Sdelphij *
19355604Sdelphij * CDDL HEADER END
20355604Sdelphij */
21355604Sdelphij
22355604Sdelphij/*
23355604Sdelphij * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24355604Sdelphij * Use is subject to license terms.
25355604Sdelphij */
26355604Sdelphij
27355604Sdelphij/*
28355604Sdelphij * ASSERTION:
29355604Sdelphij *     Positive stddev() test
30355604Sdelphij *
31104349Sphk * SECTION: Aggregations/Aggregations
32104349Sphk *
33104349Sphk * NOTES: This is a simple verifiable positive test of the stddev() function.
34355604Sdelphij *     printa() for one aggregation, default printing behavior for the other
35355604Sdelphij *     so that we exercise both code paths.
36355604Sdelphij */
37355604Sdelphij
38355604Sdelphij#pragma D option quiet
39355604Sdelphij
40355604SdelphijBEGIN
41355604Sdelphij{
42355604Sdelphij	@a = stddev(5000000000);
43355604Sdelphij	@a = stddev(5000000100);
44355604Sdelphij	@a = stddev(5000000200);
45355604Sdelphij	@a = stddev(5000000300);
46355604Sdelphij	@a = stddev(5000000400);
47355604Sdelphij	@a = stddev(5000000500);
48355604Sdelphij	@a = stddev(5000000600);
49355604Sdelphij	@a = stddev(5000000700);
50355604Sdelphij	@a = stddev(5000000800);
51355604Sdelphij	@a = stddev(5000000900);
52355604Sdelphij	@b = stddev(-5000000000);
53355604Sdelphij	@b = stddev(-5000000100);
54355604Sdelphij	@b = stddev(-5000000200);
55355604Sdelphij	@b = stddev(-5000000300);
56355604Sdelphij	@b = stddev(-5000000400);
57355604Sdelphij	@b = stddev(-5000000500);
58355604Sdelphij	@b = stddev(-5000000600);
59355604Sdelphij	@b = stddev(-5000000700);
60355604Sdelphij	@b = stddev(-5000000800);
61355604Sdelphij	@b = stddev(-5000000900);
62355604Sdelphij	printa("%@d\n", @a);
63355604Sdelphij	exit(0);
64355604Sdelphij}
65