Index: boost/crc.hpp =================================================================== --- boost/crc.hpp (revision 85052) +++ boost/crc.hpp (working copy) @@ -198,7 +198,7 @@ // Internal Operations //! Return the (truncated) polynomial divisor - value_type get_truncated_polynominal() const; + value_type get_truncated_polynomial() const; //! Return what the polynomial remainder was set to during construction value_type get_initial_remainder() const; //! Return the XOR-mask used during output processing @@ -284,7 +284,7 @@ //! \copydoc boost::crc_basic::bit_count BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); //! A copy of \a TruncPoly provided for meta-programming purposes - BOOST_STATIC_CONSTANT( value_type, truncated_polynominal = TruncPoly ); + BOOST_STATIC_CONSTANT( value_type, truncated_polynomial = TruncPoly ); //! A copy of \a InitRem provided for meta-programming purposes BOOST_STATIC_CONSTANT( value_type, initial_remainder = InitRem ); //! A copy of \a FinalXor provided for meta-programming purposes @@ -299,8 +299,8 @@ explicit crc_optimal( value_type init_rem = initial_remainder ); // Internal Operations - //! \copybrief boost::crc_basic::get_truncated_polynominal - value_type get_truncated_polynominal() const; + //! \copybrief boost::crc_basic::get_truncated_polynomial + value_type get_truncated_polynomial() const; //! \copybrief boost::crc_basic::get_initial_remainder value_type get_initial_remainder() const; //! \copybrief boost::crc_basic::get_final_xor_value @@ -1568,7 +1568,7 @@ the RMCA) \post truncated_polynomial == - this->get_truncated_polynominal() + this->get_truncated_polynomial() \post initial_remainder == this->get_initial_remainder() \post final_xor_value == @@ -1611,7 +1611,7 @@ template < std::size_t Bits > inline typename crc_basic::value_type -crc_basic::get_truncated_polynominal +crc_basic::get_truncated_polynomial ( ) const { @@ -1941,8 +1941,8 @@ \param[in] init_rem The (unaugmented) initial state of the polynomial remainder. Defaults to #initial_remainder if omitted. - \post #truncated_polynominal == - this->get_truncated_polynominal() + \post #truncated_polynomial == + this->get_truncated_polynomial() \post #initial_remainder == this->get_initial_remainder() \post #final_xor_value == this->get_final_xor_value() \post #reflect_input == this->get_reflect_input() @@ -1963,17 +1963,17 @@ { } -//! \copydetails boost::crc_basic::get_truncated_polynominal +//! \copydetails boost::crc_basic::get_truncated_polynomial template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, bool ReflectIn, bool ReflectRem > inline typename BOOST_CRC_OPTIMAL_NAME::value_type -BOOST_CRC_OPTIMAL_NAME::get_truncated_polynominal +BOOST_CRC_OPTIMAL_NAME::get_truncated_polynomial ( ) const { - return truncated_polynominal; + return truncated_polynomial; } //! \copydetails boost::crc_basic::get_initial_remainder Index: libs/crc/crc.html =================================================================== --- libs/crc/crc.html (revision 85052) +++ libs/crc/crc.html (working copy) @@ -102,11 +102,11 @@

Background

-

CRCs work by computing the remainder of a modulo-2 polynominal +

CRCs work by computing the remainder of a modulo-2 polynomial division. The message is treated as the (binary) coefficents of a long -polynominal for the dividend, with the earlier bits of the message fed -first as the polynominal's highest coefficents. A particular CRC -algorithm has another polynominal associated with it to be used as the +polynomial for the dividend, with the earlier bits of the message fed +first as the polynomial's highest coefficents. A particular CRC +algorithm has another polynomial associated with it to be used as the divisor. The quotient is ignored. The remainder of the division considered the checksum. However, the division uses modulo-2 rules (no carries) for the coefficents.

@@ -120,8 +120,8 @@

CRC Parameters

-
Truncated polynominal -
The divisor polynominal has a degree one bit larger than the +
Truncated polynomial +
The divisor polynomial has a degree one bit larger than the checksum (remainder) size. That highest bit is always one, so it is ignored when describing a particular CRC type. Excluding this bit makes the divisor fit in the same data type as the @@ -145,7 +145,7 @@
Reflected input
A message's bits are usually fed a byte at a time, with the highest bits of the byte treated as the higher bits of the - dividend polynominal. Some CRCs reflect the bits (about the + dividend polynomial. Some CRCs reflect the bits (about the byte's center, so the first and last bits are switched, etc.) before feeding. @@ -167,12 +167,12 @@ static std::size_t const bit_count = Bits; // Constructor - explicit crc_basic( value_type truncated_polynominal, + explicit crc_basic( value_type truncated_polynomial, value_type initial_remainder = 0, value_type final_xor_value = 0, bool reflect_input = false, bool reflect_remainder = false ); // Internal Operations - value_type get_truncated_polynominal() const; + value_type get_truncated_polynomial() const; value_type get_initial_remainder() const; value_type get_final_xor_value() const; bool get_reflect_input() const; @@ -218,7 +218,7 @@ // Constants reflecting template parameters static std::size_t const bit_count = Bits; - static value_type const truncated_polynominal = TruncPoly; + static value_type const truncated_polynomial = TruncPoly; static value_type const initial_remainder = InitRem; static value_type const final_xor_value = FinalXor; static bool const reflect_input = ReflectIn; @@ -228,7 +228,7 @@ explicit crc_optimal( value_type init_rem = InitRem ); // Internal Operations - value_type get_truncated_polynominal() const; + value_type get_truncated_polynomial() const; value_type get_initial_remainder() const; value_type get_final_xor_value() const; bool get_reflect_input() const; @@ -264,7 +264,7 @@ template parameters. No individual bits are considered; only whole bytes are passed. A table of interim CRC values versus byte values is pre-computed when the first object using a particular bit size, -truncated polynominal, and input reflection state is processed.

+truncated polynomial, and input reflection state is processed.

Computer Usage

@@ -278,7 +278,7 @@ default-constructed.

The CRC parameters can be inspected at run-time with the following -member functions: get_truncated_polynominal, +member functions: get_truncated_polynomial, get_initial_remainder, get_final_xor_value, get_reflect_input, and get_reflect_remainder. The fast computer also provides compile-time constants for its CRC @@ -449,7 +449,7 @@ as the register size) after the message bits.

The template parameters of the function template are -the CRC's bit size (Bits) and the truncated polynominal +the CRC's bit size (Bits) and the truncated polynomial (TruncPoly). The function parameters are the starting address of the data block to be worked on (buffer), the number of bytes in that data block (byte_count), and the incoming value of the remainder @@ -473,7 +473,7 @@ initial_remainder when calling augmented_crc on the next data block. Remember that the actual CRC can only be determined after feeding the augmented bytes. Since this method uses -modulo-2 polynominal division at its most raw, neither final XOR values +modulo-2 polynomial division at its most raw, neither final XOR values nor reflection can be used.

Note that for the same CRC system, the initial remainder for Index: libs/crc/doc/crc.qbk =================================================================== --- libs/crc/doc/crc.qbk (revision 85052) +++ libs/crc/doc/crc.qbk (working copy) @@ -241,7 +241,7 @@ [table:crc_basic_rmca RMCA Parameters in boost::crc_basic [[Parameter] [Member Name] [Kind] [Expression Type]] [[['WIDTH]] [`bit_count`] [class-static immutable data member] [`std::size_t`]] - [[['POLY]] [`get_truncated_polynominal`] [`const` member function] [`value_type`]] + [[['POLY]] [`get_truncated_polynomial`] [`const` member function] [`value_type`]] [[['INIT]] [`get_initial_remainder`] [`const` member function] [`value_type`]] [[['REFIN]] [`get_reflect_input`] [`const` member function] [`bool`]] [[['REFOUT]] [`get_reflect_remainder`] [`const` member function] [`bool`]] @@ -323,7 +323,7 @@ template parameters. [table:crc_optimal_rmca Additional RMCA Expressions in boost::crc_optimal [[New Member] [Equivalent]] - [[`truncated_polynominal`] [`get_truncated_polynominal`]] + [[`truncated_polynomial`] [`get_truncated_polynomial`]] [[`initial_remainder`] [`get_initial_remainder`]] [[`reflect_input`] [`get_reflect_input`]] [[`reflect_remainder`] [`get_reflect_remainder`]] Index: libs/crc/test/crc_test.cpp =================================================================== --- libs/crc/test/crc_test.cpp (revision 85052) +++ libs/crc/test/crc_test.cpp (working copy) @@ -8,7 +8,7 @@ // See for the library's home page. // Revision History -// 28 Aug 2004 Added CRC tests for polynominals shorter than 8 bits +// 28 Aug 2004 Added CRC tests for polynomials shorter than 8 bits // (Daryle Walker, by patch from Bert Klaps) // 23 Aug 2003 Adjust to updated Test framework (Daryle Walker) // 14 May 2001 Initial version (Daryle Walker) @@ -138,7 +138,7 @@ // Process the first half of the data (also test accessors) optimal_crc_type fast_crc1; - basic_crc_type slow_crc1( fast_crc1.get_truncated_polynominal(), + basic_crc_type slow_crc1( fast_crc1.get_truncated_polynomial(), fast_crc1.get_initial_remainder(), fast_crc1.get_final_xor_value(), fast_crc1.get_reflect_input(), fast_crc1.get_reflect_remainder() ); @@ -154,12 +154,12 @@ // Process the second half of the data (also test accessors) boost::crc_optimal fast_crc2( fast_crc1.get_interim_remainder() ); boost::crc_basic slow_crc2( - slow_crc1.get_truncated_polynominal(), slow_crc1.get_interim_remainder(), + slow_crc1.get_truncated_polynomial(), slow_crc1.get_interim_remainder(), slow_crc1.get_final_xor_value(), slow_crc1.get_reflect_input(), slow_crc1.get_reflect_remainder() ); @@ -180,10 +180,10 @@ { PRIVATE_DECLARE_BOOST( uint32_t ); - // A single-bit error is ensured to be detected if the polynominal + // A single-bit error is ensured to be detected if the polynomial // has at least two bits set. The highest bit is what is removed - // to give the truncated polynominal, and it is always set. This - // means that the truncated polynominal needs at least one of its + // to give the truncated polynomial, and it is always set. This + // means that the truncated polynomial needs at least one of its // bits set, which implies that it cannot be zero. if ( !(TrPo & boost::detail::low_bits_mask_c::value) ) { @@ -744,9 +744,9 @@ small_crc_test1(); small_crc_test2(); - // Try a CRC based on the (x + 1) polynominal, which is a factor in - // many real-life polynominals and doesn't fit evenly in a byte. - cout << "Doing one-bit polynominal CRC test." << endl; + // Try a CRC based on the (x + 1) polynomial, which is a factor in + // many real-life polynomials and doesn't fit evenly in a byte. + cout << "Doing one-bit polynomial CRC test." << endl; boost::crc_basic<1> crc_1( 1 ); crc_1.process_bytes( std_data, std_data_len ); BOOST_CHECK( crc_1.checksum() == 1 ); Index: libs/crc/test/crc_test2.cpp =================================================================== --- libs/crc/test/crc_test2.cpp (revision 85052) +++ libs/crc/test/crc_test2.cpp (working copy) @@ -101,18 +101,18 @@ typedef typename boost::uint_t::fast register_type; typedef boost::crc_basic computer_type; - register_type divisor_polynominal; + register_type divisor_polynomial; register_type initial_remainder; bool reflect_input_byte; bool reflect_output_remainder; register_type final_xor_mask; computer_type make_crc_basic() const - { return computer_type(divisor_polynominal, initial_remainder, + { return computer_type(divisor_polynomial, initial_remainder, final_xor_mask, reflect_input_byte, reflect_output_remainder); } }; -template < std::size_t Bits, boost::uintmax_t DivisorPolynominal, +template < std::size_t Bits, boost::uintmax_t DivisorPolynomial, boost::uintmax_t InitialRemainder, bool ReflectInputBytes, bool ReflectOutputRemainder, boost::uintmax_t FinalXorMask > class my_crc_ct_traits @@ -120,12 +120,12 @@ public: typedef my_crc_rt_traits rt_adaptor_type; typedef typename rt_adaptor_type::register_type register_type; - typedef boost::crc_optimal computer_type; typedef boost::mpl::size_t register_length_c; - typedef boost::mpl::integral_c - divisor_polynominal_c; + typedef boost::mpl::integral_c + divisor_polynomial_c; typedef boost::mpl::integral_c initial_remainder_c; typedef boost::mpl::bool_ reflect_input_byte_c; @@ -136,7 +136,7 @@ operator rt_adaptor_type() const { - rt_adaptor_type const result = { divisor_polynominal_c::value, + rt_adaptor_type const result = { divisor_polynomial_c::value, initial_remainder_c::value, reflect_input_byte_c::value, reflect_output_remainder_c::value, final_xor_mask_c::value }; @@ -145,27 +145,27 @@ static computer_type make_crc_optimal() { return boost::crc_optimal(); } }; -template < std::size_t Bits, boost::uintmax_t DivisorPolynominal, +template < std::size_t Bits, boost::uintmax_t DivisorPolynomial, boost::uintmax_t InitialRemainder, bool ReflectInputBytes, bool ReflectOutputRemainder, boost::uintmax_t FinalXorMask, boost::uintmax_t StandardTestDataResult > class my_crc_test_traits { public: - typedef my_crc_ct_traits ct_traits_type; typedef my_crc_rt_traits rt_traits_type; typedef typename rt_traits_type::register_type register_type; typedef boost::mpl::size_t register_length_c; - typedef boost::mpl::integral_c - divisor_polynominal_c; + typedef boost::mpl::integral_c + divisor_polynomial_c; typedef boost::mpl::integral_c initial_remainder_c; typedef boost::mpl::bool_ reflect_input_byte_c; @@ -239,7 +239,7 @@ BOOST_AUTO( crc_s, CRCPolicy::make_crc_basic() ); typename CRCPolicy::register_type const func_result = boost::crc faster_crc2( faster_crc1.get_interim_remainder() ); boost::crc_basic slower_crc2( - slower_crc1.get_truncated_polynominal(), + slower_crc1.get_truncated_polynomial(), slower_crc1.get_interim_remainder(), slower_crc1.get_final_xor_value(), slower_crc1.get_reflect_input(), slower_crc1.get_reflect_remainder() ); @@ -308,7 +308,7 @@ // modulo-2 polynomial divisor has at least two non-zero coefficients. The // implicit highest coefficient is always one, so that leaves an explicit // coefficient, i.e. at least one of the polynomial's bits is set. - BOOST_REQUIRE( CRCPolicy::divisor_polynominal_c::value & + BOOST_REQUIRE( CRCPolicy::divisor_polynomial_c::value & low_bits_mask_c::value ); // Create a random block of data @@ -481,7 +481,7 @@ return boost::crc<3u, 0x03u, 0u, 0u, false, false>( buffer, byte_count ); } -BOOST_AUTO_TEST_CASE( sub_nybble_polynominal_test ) +BOOST_AUTO_TEST_CASE( sub_nybble_polynomial_test ) { // The CRC standard is a SDH/SONET Low Order LCAS control word with CRC-3 // taken from ITU-T G.707 (12/03) XIII.2. @@ -529,7 +529,7 @@ return boost::crc<7u, 0x09u, 0u, 0u, false, false>( buffer, byte_count ); } -BOOST_AUTO_TEST_CASE( sub_octet_polynominal_test ) +BOOST_AUTO_TEST_CASE( sub_octet_polynomial_test ) { // The CRC standard is a SDH/SONET J0/J1/J2/N1/N2/TR TTI (trace message) // with CRC-7, o.a. ITU-T G.707 Annex B, G.832 Annex A. @@ -564,10 +564,10 @@ // byte-wise, so the register size needs to be a multiple of CHAR_BIT.) } -BOOST_AUTO_TEST_CASE( one_bit_polynominal_test ) +BOOST_AUTO_TEST_CASE( one_bit_polynomial_test ) { - // Try a CRC based on the (x + 1) polynominal, which is a factor in - // many real-life polynominals and doesn't fit evenly in a byte. + // Try a CRC based on the (x + 1) polynomial, which is a factor in + // many real-life polynomials and doesn't fit evenly in a byte. boost::crc_basic<1u> crc_1( 1u ); crc_1.process_bytes( std_data, std_data_len ); Index: libs/math/test/common_factor_test.cpp =================================================================== --- libs/math/test/common_factor_test.cpp (revision 85052) +++ libs/math/test/common_factor_test.cpp (working copy) @@ -31,7 +31,7 @@ namespace { -// TODO: add polynominal/non-real type; especially after any switch to the +// TODO: add polynomial/non-real type; especially after any switch to the // binary-GCD algorithm for built-in types // Custom integer class (template) @@ -363,7 +363,7 @@ } // TODO: non-built-in signed and unsigned integer tests, with and without -// numeric_limits specialization; polynominal tests; note any changes if +// numeric_limits specialization; polynomial tests; note any changes if // built-ins switch to binary-GCD algorithm BOOST_AUTO_TEST_SUITE_END()