652{
653 static const int flags[] = {
654 0,
662 };
663 const struct {
669 {
"%a",
NAN, {
"nan",
"0x1.#QNAN00000000p+0",
"nan",
"0x1.#QNAN00000000p+0" }},
670 {
"%A",
NAN, {
"NAN",
"0X1.#QNAN00000000P+0",
"NAN",
"0X1.#QNAN00000000P+0" }},
671 {
"%e",
NAN, {
"nan",
"1.#QNAN0e+00",
"nan",
"1.#QNAN0e+000" }},
672 {
"%E",
NAN, {
"NAN",
"1.#QNAN0E+00",
"NAN",
"1.#QNAN0E+000" }},
673 {
"%g",
NAN, {
"nan",
"1.#QNAN",
"nan",
"1.#QNAN" }},
674 {
"%G",
NAN, {
"NAN",
"1.#QNAN",
"NAN",
"1.#QNAN" }},
675 {
"%21a",
NAN, {
" nan",
" 0x1.#QNAN00000000p+0",
" nan",
" 0x1.#QNAN00000000p+0" }},
676 {
"%20e",
NAN, {
" nan",
" 1.#QNAN0e+00",
" nan",
" 1.#QNAN0e+000" }},
677 {
"%20g",
NAN, {
" nan",
" 1.#QNAN",
" nan",
" 1.#QNAN" }},
678 {
"%.21a",
NAN, {
"nan",
"0x1.#QNAN0000000000000000p+0",
"nan",
"0x1.#QNAN0000000000000000p+0" }},
679 {
"%.20e",
NAN, {
"nan",
"1.#QNAN000000000000000e+00",
"nan",
"1.#QNAN000000000000000e+000" }},
680 {
"%.20g",
NAN, {
"nan",
"1.#QNAN",
"nan",
"1.#QNAN" }},
681 {
"%.021a",
NAN, {
"nan",
"0x1.#QNAN0000000000000000p+0",
"nan",
"0x1.#QNAN0000000000000000p+0" }},
682 {
"%.020e",
NAN, {
"nan",
"1.#QNAN000000000000000e+00",
"nan",
"1.#QNAN000000000000000e+000" }},
683 {
"%.020g",
NAN, {
"nan",
"1.#QNAN",
"nan",
"1.#QNAN" }},
684 {
"%#.21a",
NAN, {
"nan",
"0x1.#QNAN0000000000000000p+0",
"nan",
"0x1.#QNAN0000000000000000p+0" }},
685 {
"%#.20e",
NAN, {
"nan",
"1.#QNAN000000000000000e+00",
"nan",
"1.#QNAN000000000000000e+000" }},
686 {
"%#.20g",
NAN, {
"nan",
"1.#QNAN00000000000000",
"nan",
"1.#QNAN00000000000000" }},
687 {
"%.1g",
NAN, {
"nan",
"1",
"nan",
"1" }},
688 {
"%.2g",
NAN, {
"nan",
"1.$",
"nan",
"1.$" }},
689 {
"%.3g",
NAN, {
"nan",
"1.#R",
"nan",
"1.#R" }},
690
691 {
"%a",
IND, {
"-nan(ind)",
"-0x1.#IND000000000p+0",
"-nan(ind)",
"-0x1.#IND000000000p+0" }},
692 {
"%e",
IND, {
"-nan(ind)",
"-1.#IND00e+00",
"-nan(ind)",
"-1.#IND00e+000" }},
693 {
"%g",
IND, {
"-nan(ind)",
"-1.#IND",
"-nan(ind)",
"-1.#IND" }},
694 {
"%21a",
IND, {
" -nan(ind)",
"-0x1.#IND000000000p+0",
" -nan(ind)",
"-0x1.#IND000000000p+0" }},
695 {
"%20e",
IND, {
" -nan(ind)",
" -1.#IND00e+00",
" -nan(ind)",
" -1.#IND00e+000" }},
696 {
"%20g",
IND, {
" -nan(ind)",
" -1.#IND",
" -nan(ind)",
" -1.#IND" }},
697 {
"%.21a",
IND, {
"-nan(ind)",
"-0x1.#IND00000000000000000p+0",
"-nan(ind)",
"-0x1.#IND00000000000000000p+0" }},
698 {
"%.20e",
IND, {
"-nan(ind)",
"-1.#IND0000000000000000e+00",
"-nan(ind)",
"-1.#IND0000000000000000e+000" }},
699 {
"%.20g",
IND, {
"-nan(ind)",
"-1.#IND",
"-nan(ind)",
"-1.#IND" }},
700 {
"%.021a",
IND, {
"-nan(ind)",
"-0x1.#IND00000000000000000p+0",
"-nan(ind)",
"-0x1.#IND00000000000000000p+0" }},
701 {
"%.020e",
IND, {
"-nan(ind)",
"-1.#IND0000000000000000e+00",
"-nan(ind)",
"-1.#IND0000000000000000e+000" }},
702 {
"%.020g",
IND, {
"-nan(ind)",
"-1.#IND",
"-nan(ind)",
"-1.#IND" }},
703 {
"%#.21a",
IND, {
"-nan(ind)",
"-0x1.#IND00000000000000000p+0",
"-nan(ind)",
"-0x1.#IND00000000000000000p+0" }},
704 {
"%#.20e",
IND, {
"-nan(ind)",
"-1.#IND0000000000000000e+00",
"-nan(ind)",
"-1.#IND0000000000000000e+000" }},
705 {
"%#.20g",
IND, {
"-nan(ind)",
"-1.#IND000000000000000",
"-nan(ind)",
"-1.#IND000000000000000" }},
706
707 {
"%a",
INFINITY, {
"inf",
"0x1.#INF000000000p+0",
"inf",
"0x1.#INF000000000p+0" }},
708 {
"%e",
INFINITY, {
"inf",
"1.#INF00e+00",
"inf",
"1.#INF00e+000" }},
709 {
"%g",
INFINITY, {
"inf",
"1.#INF",
"inf",
"1.#INF" }},
710 {
"%21a",
INFINITY, {
" inf",
" 0x1.#INF000000000p+0",
" inf",
" 0x1.#INF000000000p+0" }},
711 {
"%20e",
INFINITY, {
" inf",
" 1.#INF00e+00",
" inf",
" 1.#INF00e+000" }},
712 {
"%20g",
INFINITY, {
" inf",
" 1.#INF",
" inf",
" 1.#INF" }},
713 {
"%.21a",
INFINITY, {
"inf",
"0x1.#INF00000000000000000p+0",
"inf",
"0x1.#INF00000000000000000p+0" }},
714 {
"%.20e",
INFINITY, {
"inf",
"1.#INF0000000000000000e+00",
"inf",
"1.#INF0000000000000000e+000" }},
715 {
"%.20g",
INFINITY, {
"inf",
"1.#INF",
"inf",
"1.#INF" }},
716 {
"%.021a",
INFINITY, {
"inf",
"0x1.#INF00000000000000000p+0",
"inf",
"0x1.#INF00000000000000000p+0" }},
717 {
"%.020e",
INFINITY, {
"inf",
"1.#INF0000000000000000e+00",
"inf",
"1.#INF0000000000000000e+000" }},
718 {
"%.020g",
INFINITY, {
"inf",
"1.#INF",
"inf",
"1.#INF" }},
719 {
"%#.21a",
INFINITY, {
"inf",
"0x1.#INF00000000000000000p+0",
"inf",
"0x1.#INF00000000000000000p+0" }},
720 {
"%#.20e",
INFINITY, {
"inf",
"1.#INF0000000000000000e+00",
"inf",
"1.#INF0000000000000000e+000" }},
721 {
"%#.20g",
INFINITY, {
"inf",
"1.#INF000000000000000",
"inf",
"1.#INF000000000000000" }},
722
723 {
"%a", -
INFINITY, {
"-inf",
"-0x1.#INF000000000p+0",
"-inf",
"-0x1.#INF000000000p+0" }},
724 {
"%e", -
INFINITY, {
"-inf",
"-1.#INF00e+00",
"-inf",
"-1.#INF00e+000" }},
725 {
"%g", -
INFINITY, {
"-inf",
"-1.#INF",
"-inf",
"-1.#INF" }},
726 {
"%21a", -
INFINITY, {
" -inf",
"-0x1.#INF000000000p+0",
" -inf",
"-0x1.#INF000000000p+0" }},
727 {
"%20e", -
INFINITY, {
" -inf",
" -1.#INF00e+00",
" -inf",
" -1.#INF00e+000" }},
728 {
"%20g", -
INFINITY, {
" -inf",
" -1.#INF",
" -inf",
" -1.#INF" }},
729 {
"%.21a", -
INFINITY, {
"-inf",
"-0x1.#INF00000000000000000p+0",
"-inf",
"-0x1.#INF00000000000000000p+0" }},
730 {
"%.20e", -
INFINITY, {
"-inf",
"-1.#INF0000000000000000e+00",
"-inf",
"-1.#INF0000000000000000e+000" }},
731 {
"%.20g", -
INFINITY, {
"-inf",
"-1.#INF",
"-inf",
"-1.#INF" }},
732 {
"%.021a", -
INFINITY, {
"-inf",
"-0x1.#INF00000000000000000p+0",
"-inf",
"-0x1.#INF00000000000000000p+0" }},
733 {
"%.020e", -
INFINITY, {
"-inf",
"-1.#INF0000000000000000e+00",
"-inf",
"-1.#INF0000000000000000e+000" }},
734 {
"%.020g", -
INFINITY, {
"-inf",
"-1.#INF",
"-inf",
"-1.#INF" }},
735 {
"%#.21a", -
INFINITY, {
"-inf",
"-0x1.#INF00000000000000000p+0",
"-inf",
"-0x1.#INF00000000000000000p+0" }},
736 {
"%#.20e", -
INFINITY, {
"-inf",
"-1.#INF0000000000000000e+00",
"-inf",
"-1.#INF0000000000000000e+000" }},
737 {
"%#.20g", -
INFINITY, {
"-inf",
"-1.#INF000000000000000",
"-inf",
"-1.#INF000000000000000" }},
738
739 { "%a", 0, { "0x0.0000000000000p+0" }},
740 { "%A", 0, { "0X0.0000000000000P+0" }},
741 { "%a", 0.5, { "0x1.0000000000000p-1" }},
742 { "%a", 1, { "0x1.0000000000000p+0" }},
743 { "%a", 20, { "0x1.4000000000000p+4" }},
744 { "%a", -1, { "-0x1.0000000000000p+0" }},
745 { "%a", 0.1, { "0x1.999999999999ap-4" }},
746 { "%24a", 0.1, { " 0x1.999999999999ap-4" }},
747 { "%024a", 0.1, { "0x00001.999999999999ap-4" }},
748 { "%.2a", 0.1, { "0x1.9ap-4" }},
749 { "%.20a", 0.1, { "0x1.999999999999a0000000p-4" }},
750 { "%.a", 0.1e-20, { "0x1p-70" }},
751 { "%a", 0.1e-20, { "0x1.2e3b40a0e9b4fp-70" }},
752 { "%a", 4.9406564584124654e-324, { "0x0.0000000000001p-1022" }},
753 { "%.0a", -1.5, { "-0x2p+0" }, { "-0x1p+0" }},
754 { "%.0a", -0.5, { "-0x1p-1" }},
755 { "%.0a", 0.5, { "0x1p-1" }},
756 { "%.0a", 1.5, { "0x2p+0" }, { "0x1p+0" }},
757 { "%.0a", 1.99, { "0x2p+0" }},
758 { "%.0a", 2, { "0x1p+1" }},
759 { "%.0a", 9.5, { "0x1p+3" }},
760 { "%.0a", 10.5, { "0x1p+3" }},
761 { "%#.0a", -1.5, { "-0x2.p+0" }, { "-0x1.p+0" }},
762 { "%#.0a", -0.5, { "-0x1.p-1" }},
763 { "%#.0a", 0.5, { "0x1.p-1" }},
764 { "%#.0a", 1.5, { "0x2.p+0" }, { "0x1.p+0" }},
765 {
"%#.1a", 1.03125, {
"0x1.1p+0",
NULL,
NULL,
NULL,
"0x1.0p+0" }, {
"0x1.0p+0" }},
766 { "%#.1a", 1.09375, { "0x1.2p+0" }, { "0x1.1p+0" }},
767 {
"%#.1a", 1.15625, {
"0x1.3p+0",
NULL,
NULL,
NULL,
"0x1.2p+0" }, {
"0x1.2p+0" }},
768
769 { "%f", 0, { "0.000000" }},
770 {
"%e", 0, {
"0.000000e+00",
NULL,
"0.000000e+000" }},
771 { "%g", 0, { "0" }},
772 { "%21f", 0, { " 0.000000" }},
773 {
"%20e", 0, {
" 0.000000e+00",
NULL,
" 0.000000e+000" }},
774 { "%20g", 0, { " 0" }},
775 { "%.21f", 0, { "0.000000000000000000000" }},
776 {
"%.20e", 0, {
"0.00000000000000000000e+00",
NULL,
"0.00000000000000000000e+000" }},
777 { "%.20g", 0, { "0" }},
778 { "%.021f", 0, { "0.000000000000000000000" }},
779 {
"%.020e", 0, {
"0.00000000000000000000e+00",
NULL,
"0.00000000000000000000e+000" }},
780 { "%.020g", 0, { "0" }},
781 { "%#.21f", 0, { "0.000000000000000000000" }},
782 {
"%#.20e", 0, {
"0.00000000000000000000e+00",
NULL,
"0.00000000000000000000e+000" }},
783 { "%#.20g", 0, { "0.0000000000000000000" }, { "0.00000000000000000000" }},
784
785 { "%f", 123, { "123.000000" }},
786 {
"%e", 123, {
"1.230000e+02",
NULL,
"1.230000e+002" }},
787 { "%g", 123, { "123" }},
788 { "%21f", 123, { " 123.000000" }},
789 {
"%20e", 123, {
" 1.230000e+02",
NULL,
" 1.230000e+002" }},
790 { "%20g", 123, { " 123" }},
791 { "%.21f", 123, { "123.000000000000000000000" }},
792 {
"%.20e", 123, {
"1.23000000000000000000e+02",
NULL,
"1.23000000000000000000e+002" }},
793 { "%.20g", 123, { "123" }},
794 { "%.021f", 123, { "123.000000000000000000000" }},
795 {
"%.020e", 123, {
"1.23000000000000000000e+02",
NULL,
"1.23000000000000000000e+002" }},
796 { "%.020g", 123, { "123" }},
797 { "%#.21f", 123, { "123.000000000000000000000" }},
798 {
"%#.20e", 123, {
"1.23000000000000000000e+02",
NULL,
"1.23000000000000000000e+002" }},
799 { "%#.20g", 123, { "123.00000000000000000" }},
800
801 { "%f", -765, { "-765.000000" }},
802 {
"%e", -765, {
"-7.650000e+02",
NULL,
"-7.650000e+002" }},
803 { "%g", -765, { "-765" }},
804 { "%21f", -765, { " -765.000000" }},
805 {
"%20e", -765, {
" -7.650000e+02",
NULL,
" -7.650000e+002" }},
806 { "%20g", -765, { " -765" }},
807 { "%.21f", -765, { "-765.000000000000000000000" }},
808 {
"%.20e", -765, {
"-7.65000000000000000000e+02",
NULL,
"-7.65000000000000000000e+002" }},
809 { "%.20g", -765, { "-765" }},
810 { "%.021f", -765, { "-765.000000000000000000000" }},
811 {
"%.020e", -765, {
"-7.65000000000000000000e+02",
NULL,
"-7.65000000000000000000e+002" }},
812 { "%.020g", -765, { "-765" }},
813 { "%#.21f", -765, { "-765.000000000000000000000" }},
814 {
"%#.20e", -765, {
"-7.65000000000000000000e+02",
NULL,
"-7.65000000000000000000e+002" }},
815 { "%#.20g", -765, { "-765.00000000000000000" }},
816 { "%.30f", 1.0/3.0, { "0.333333333333333314829616256247" }},
817 {
"%.30lf",
sqrt(2), {
"1.414213562373095145474621858739" }},
818 { "%f", 3.141592653590000, { "3.141593" }},
819 { "%.10f", 3.141592653590000, { "3.1415926536" }},
820 { "%.11f", 3.141592653590000, { "3.14159265359" }},
821 { "%.15f", 3.141592653590000, { "3.141592653590000" }},
822 {
"%.15f",
M_PI, {
"3.141592653589793" }},
823 { "%.13f", 37.866261574537077, { "37.8662615745371" }},
824 { "%.14f", 37.866261574537077, { "37.86626157453708" }},
825 { "%.15f", 37.866261574537077, { "37.866261574537077" }},
826 { "%.0g", 9.8949714229143402e-05, { "0.0001" }},
827 {
"%.0f", 0.5, {
"1",
NULL,
NULL,
NULL,
"0" }, {
NULL,
NULL,
NULL,
NULL,
"1" }},
828 { "%.0f", 1.5, { "2" }},
829 {
"%.0f", 2.5, {
"3",
NULL,
NULL,
NULL,
"2" }, {
NULL,
NULL,
NULL,
NULL,
"3" }},
830 { "%g", 9.999999999999999e-5, { "0.0001" }},
831
832 { "%g", 0.0005, { "0.0005" }},
833 {
"%g", 0.00005, {
"5e-05",
NULL,
"5e-005" }},
834 {
"%g", 0.000005, {
"5e-06",
NULL,
"5e-006" }},
835 {
"%g", 999999999999999.0, {
"1e+15",
NULL,
"1e+015" }},
836 {
"%g", 1000000000000000.0, {
"1e+15",
NULL,
"1e+015" }},
837 { "%.15g", 0.0005, { "0.0005" }},
838 {
"%.15g", 0.00005, {
"5e-05",
NULL,
"5e-005" }},
839 {
"%.15g", 0.000005, {
"5e-06",
NULL,
"5e-006" }},
840 { "%.15g", 999999999999999.0, { "999999999999999" }},
841 {
"%.15g", 1000000000000000.0, {
"1e+15",
NULL,
"1e+015" }},
842 };
843
845 const char *broken_res;
848
850 {
852
854 {
857
862 "%d,%d) buf = %s, expected %s\n",
i,
j,
buf,
res);
863 }
864 }
865}
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
ACPI_SIZE strlen(const char *String)
#define _CRT_INTERNAL_PRINTF_STANDARD_ROUNDING
#define _CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS
GLdouble GLdouble GLdouble r
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static struct test_info tests[]