1 5984 jhaslam /* 2 5984 jhaslam * CDDL HEADER START 3 5984 jhaslam * 4 5984 jhaslam * The contents of this file are subject to the terms of the 5 5984 jhaslam * Common Development and Distribution License (the "License"). 6 5984 jhaslam * You may not use this file except in compliance with the License. 7 5984 jhaslam * 8 5984 jhaslam * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 5984 jhaslam * or http://www.opensolaris.org/os/licensing. 10 5984 jhaslam * See the License for the specific language governing permissions 11 5984 jhaslam * and limitations under the License. 12 5984 jhaslam * 13 5984 jhaslam * When distributing Covered Code, include this CDDL HEADER in each 14 5984 jhaslam * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 5984 jhaslam * If applicable, add the following below this CDDL HEADER, with the 16 5984 jhaslam * fields enclosed by brackets "[]" replaced with your own identifying 17 5984 jhaslam * information: Portions Copyright [yyyy] [name of copyright owner] 18 5984 jhaslam * 19 5984 jhaslam * CDDL HEADER END 20 5984 jhaslam */ 21 5984 jhaslam 22 5984 jhaslam /* 23 9531 rafael * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 5984 jhaslam * Use is subject to license terms. 25 5984 jhaslam */ 26 5984 jhaslam 27 5984 jhaslam /* 28 5984 jhaslam * ASSERTION: 29 9531 rafael * Positive stddev() test 30 5984 jhaslam * 31 5984 jhaslam * SECTION: Aggregations/Aggregations 32 5984 jhaslam * 33 5984 jhaslam * NOTES: This is a simple verifiable positive test of the stddev() function. 34 9531 rafael * printa() for one aggregation, default printing behavior for the other 35 9531 rafael * so that we exercise both code paths. 36 5984 jhaslam */ 37 5984 jhaslam 38 5984 jhaslam #pragma D option quiet 39 5984 jhaslam 40 5984 jhaslam BEGIN 41 5984 jhaslam { 42 5984 jhaslam @a = stddev(5000000000); 43 5984 jhaslam @a = stddev(5000000100); 44 5984 jhaslam @a = stddev(5000000200); 45 5984 jhaslam @a = stddev(5000000300); 46 5984 jhaslam @a = stddev(5000000400); 47 5984 jhaslam @a = stddev(5000000500); 48 5984 jhaslam @a = stddev(5000000600); 49 5984 jhaslam @a = stddev(5000000700); 50 5984 jhaslam @a = stddev(5000000800); 51 5984 jhaslam @a = stddev(5000000900); 52 5984 jhaslam @b = stddev(-5000000000); 53 5984 jhaslam @b = stddev(-5000000100); 54 5984 jhaslam @b = stddev(-5000000200); 55 5984 jhaslam @b = stddev(-5000000300); 56 5984 jhaslam @b = stddev(-5000000400); 57 5984 jhaslam @b = stddev(-5000000500); 58 5984 jhaslam @b = stddev(-5000000600); 59 5984 jhaslam @b = stddev(-5000000700); 60 5984 jhaslam @b = stddev(-5000000800); 61 5984 jhaslam @b = stddev(-5000000900); 62 9531 rafael printa("%@d\n", @a); 63 5984 jhaslam exit(0); 64 5984 jhaslam } 65