<commit_before>/**
* Compute the hypotenuse avoiding overflow and underflow.
*/
#include <nan.h>
#include "hypot.h"

/**
* Add-on namespace.
*/
namespace addon_hypot {

	using Nan::FunctionCallbackInfo;
	using Nan::ThrowTypeError;
	using Nan::ThrowError;
	using v8::Number;
	using v8::Local;
	using v8::Value;

	/**
	* Computes the hypotenuse avoiding overflow and underflow.
	*
	* When called from JavaScript, the function expects two arguments:
	*
	* * __x__: a number.
	* * __y__: a number.
	*
	* @param info   arguments
	*/
	void node_hypot( const FunctionCallbackInfo<Value>& info ) {
		if ( info.Length() != 2 ) {
			ThrowError( "invalid invocation. Must provide 2 arguments." );
			return;
		}
		if ( !info[ 0 ]->IsNumber() ) {
			ThrowTypeError( "invalid input argument. First argument must be a number." );
			return;
		}
		if ( !info[ 1 ]->IsNumber() ) {
			ThrowTypeError( "invalid input argument. Second argument must be a number." );
			return;
		}
		const double x = info[ 0 ]->NumberValue();
		const double y = info[ 1 ]->NumberValue();

		Local<Number> sum = Nan::New( c_hypot( x, y ) );
		info.GetReturnValue().Set( sum );
	}

	NAN_MODULE_INIT( Init ) {<commit_msg>Rename variable<commit_after>/**
* Compute the hypotenuse avoiding overflow and underflow.
*/
#include <nan.h>
#include "hypot.h"

/**
* Add-on namespace.
*/
namespace addon_hypot {

	using Nan::FunctionCallbackInfo;
	using Nan::ThrowTypeError;
	using Nan::ThrowError;
	using v8::Number;
	using v8::Local;
	using v8::Value;

	/**
	* Computes the hypotenuse avoiding overflow and underflow.
	*
	* When called from JavaScript, the function expects two arguments:
	*
	* * __x__: a number.
	* * __y__: a number.
	*
	* @param info   arguments
	*/
	void node_hypot( const FunctionCallbackInfo<Value>& info ) {
		if ( info.Length() != 2 ) {
			ThrowError( "invalid invocation. Must provide 2 arguments." );
			return;
		}
		if ( !info[ 0 ]->IsNumber() ) {
			ThrowTypeError( "invalid input argument. First argument must be a number." );
			return;
		}
		if ( !info[ 1 ]->IsNumber() ) {
			ThrowTypeError( "invalid input argument. Second argument must be a number." );
			return;
		}
		const double x = info[ 0 ]->NumberValue();
		const double y = info[ 1 ]->NumberValue();

		Local<Number> h = Nan::New( c_hypot( x, y ) );
		info.GetReturnValue().Set( h );
	}

	NAN_MODULE_INIT( Init ) {
{'fraction_non_alphanumeric': 0.14140558848433532, 'fraction_numerical': 0.007620660457239628, 'mean_word_length': 3.59727626459144, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1217126', 'n_tokens_mistral': 883, 'n_tokens_neox': 794, 'n_words': 243}