<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkMathTest.cxx
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif

#include "itkMath.h"
#include <iostream>
#include <cstdlib>


// we are temporarily not going to use a ctest driver so just this
//compilation will fail when there is a problem with the Math header
//int itkMathTest( int, char *[] )
int main( int, char *[] )
{
  bool ok = true;


#ifndef ITK_LEGACY_REMOVE && !(defined(_MSC_VER) && (_MSC_VER <= 1300))

  std::cout << itk::Math::RoundHalfIntegerToEven( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerToEven( 1.9 ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp( 1.9 ) << std::endl;
  std::cout << itk::Math::Round( 1.9f ) << std::endl;
  std::cout << itk::Math::Round( 1.9 ) << std::endl;
  std::cout << itk::Math::Floor( 1.9f ) << std::endl;
  std::cout << itk::Math::Floor( 1.9 ) << std::endl;
  std::cout << itk::Math::Ceil( 1.9f ) << std::endl;
  std::cout << itk::Math::Ceil( 1.9 ) << std::endl;

#endif

  std::cout << itk::Math::RoundHalfIntegerToEven<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerToEven<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::Round<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::Round<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::Floor<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::Floor<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::Ceil<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::Ceil<int>( 1.9 ) << std::endl;


  if (!ok)
    {
    return EXIT_FAILURE;
    }
  else
    {
    std::cout<<"Test passed"<<std::endl;
    return EXIT_SUCCESS;
    }
  
}
<commit_msg>COMP: careless copy and pass of the preprocessor directives<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkMathTest.cxx
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif

#include "itkMath.h"
#include <iostream>
#include <cstdlib>


// we are temporarily not going to use a ctest driver so just this
//compilation will fail when there is a problem with the Math header
//int itkMathTest( int, char *[] )
int main( int, char *[] )
{
  bool ok = true;


#if !defined(ITK_LEGACY_REMOVE) && !(defined(_MSC_VER) && (_MSC_VER <= 1300))

  std::cout << itk::Math::RoundHalfIntegerToEven( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerToEven( 1.9 ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp( 1.9 ) << std::endl;
  std::cout << itk::Math::Round( 1.9f ) << std::endl;
  std::cout << itk::Math::Round( 1.9 ) << std::endl;
  std::cout << itk::Math::Floor( 1.9f ) << std::endl;
  std::cout << itk::Math::Floor( 1.9 ) << std::endl;
  std::cout << itk::Math::Ceil( 1.9f ) << std::endl;
  std::cout << itk::Math::Ceil( 1.9 ) << std::endl;

#endif

  std::cout << itk::Math::RoundHalfIntegerToEven<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerToEven<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::RoundHalfIntegerUp<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::Round<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::Round<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::Floor<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::Floor<int>( 1.9 ) << std::endl;
  std::cout << itk::Math::Ceil<int>( 1.9f ) << std::endl;
  std::cout << itk::Math::Ceil<int>( 1.9 ) << std::endl;


  if (!ok)
    {
    return EXIT_FAILURE;
    }
  else
    {
    std::cout<<"Test passed"<<std::endl;
    return EXIT_SUCCESS;
    }
  
}

{'fraction_non_alphanumeric': 0.2384737678855326, 'fraction_numerical': 0.019077901430842606, 'mean_word_length': 4.429341963322546, 'pattern_counts': {'":': 0, '<': 197, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4493963', 'n_tokens_mistral': 1857, 'n_tokens_neox': 1724, 'n_words': 408}