OpenLLM-France/wikimedia huggingface dataset:
# Nakhmanson Gambit, Kf6 Defence, Rook Attack
### 10...Kf7

Black's king is heading for the safety of g8. If White sees the king slipping through her fingers and plays a panic check, obvious moves will be enough for Black to stave off checkmate: 11.Qf4+ Kg8 12.Ng5 (or 11.Ng5+ Kg8 12.Qf4) Qe8 13.Qc4+ d5:
* 14.Rxe7 Bxe7 15.Qxd5+ Kf8 16.Qf3+ Bf6 0-1
* 14.Qxc7 h6 makes a hidey-hole for the king on h7. If the White knight had checked on e5 instead of g5, Black would now have 14...Nc6! taking advantage of the undefended rook on e1.
So White needs to forget about checkmate and focus on winning back the piece with 11. Bg5.
When contributing to this Wikibook, please follow the Conventions for organization.
# Scotch Gambit Accepted
### 7...Qxd5

Qxd5 recaptures the bishop. Now the only sensible response by White is Nc3, using the d1 to d5 pin and the e1 to e8 pin to fork the queen and double attack the knight.
As mentioned, the only move for White is 8. Nc3.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
    1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4.d4 exd4 5. O-O Nxe4 6. Re1 d5 7. Bxd5 Qxd5
| | 8 | 9 | 10 | |
| Main Line | Nc3 Qa5 | Nxe4 Be6 | Neg5 O-O-O | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.
# Nakhmanson Gambit, Kf6 Defence, Rook Attack
### 12. Qf4

Black is trying not to get checkmated, so plays 12...Kg8.
When contributing to this Wikibook, please follow the Conventions for organization.
# Nakhmanson Gambit, Kf6 Defence, Rook Attack
### 12...Kg8

White has to play 13.Qh4 here to guarantee winning the piece back. If White tries 13.bxc3, Black simply steps out of the pin with 13...Qd7.
After 13.Qh4, Black can throw in 13...cxb2 14.Rab1, arriving at the same position as after 11...cxb2 12.Rab1 d5 13.Qf4+ Kg8 14.Qh4, but then comes the moment of truth: Black has to find 14...Ng6! (or the identical 14...Nf5!) allowing White to take the piece only at the cost of trading queens.
15.Bxd8 Nxh4 16.Bxh4 follows, then there's no point trying to save the pawn with 16...Ba3? due to the rook check on e8, so Black must settle for 16...h5 developing the rook via h6. Black is a healthy pawn up with a safe king and the bishop pair, and should be able to tune into Channel 0-1 from here.
When contributing to this Wikibook, please follow the Conventions for organization.
# Scotch Gambit Accepted
### 7. Bxd5!!

White plays the astounding Bxd5!! which seems to blunder a bishop. However, after Qxd5, Nc3! takes advantage of the two heavy piece pins and wins back the piece with a fork.
The only (natural) followup is 7...Qxd5.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 4.d4 exd4 5. O-O Nxe4 6. Re1 d5 7. Bxd5
| | 7 | 8 | 9 |
| Main Line | ... Qxd5 | Nc3 Qa5 | Nxe4 Be6 | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.
# C++ Programming/Operators/Chaining
## Chaining

The above line illustrates what is called chaining of insertion operators to print multiple expressions. How this works is as follows:
* The leftmost insertion operator takes as its operands, std::cout and the string "The sum of ", it prints the latter using the former, and returns a reference to the former.
* Now std::cout << a is evaluated. This prints the value contained in the location a, i.e. 123 and again returns std::cout.
* This process continues. Thus, successively the expressions std::cout << " and ", std::cout << b, std::cout << " is ", std::cout << " sum ", std::cout << "\n" are evaluated and the whole series of chained values is printed.
# C++ Programming/Operators/Pointers/Smart Pointers
## Smart Pointers

Using raw pointers to store allocated data and then cleaning them up in the destructor can generally be considered a very bad idea since it is error-prone. Even temporarily storing allocated data in a raw pointer and then deleting it when done with it should be avoided for this reason. For example, if your code throws an exception, it can be cumbersome to properly catch the exception and delete all allocated objects.
Smart pointers can alleviate this headache by using the compiler and language semantics to ensure the pointer content is automatically released when the pointer itself goes out of scope.

## Semantics

The auto_ptr has semantics of strict ownership, meaning that the auto_ptr instance is the sole entity responsible for the object's lifetime. If an auto_ptr is copied, the source loses the reference. For example:
This code will print a NULL address for the first auto_ptr object and some non-NULL address for the second, showing that the source object lost the reference during the assignment (=). The raw pointer i in the example should not be deleted, as it will be deleted by the auto_ptr that owns the reference. In fact, new int could be passed directly into x, eliminating the need for i.
Notice that the object pointed by an auto_ptr is destructed using operator delete; this means that you should only use auto_ptr for pointers obtained with operator new. This excludes pointers returned by malloc, calloc or realloc and operator new.
# C++ Programming/Operators/Pointers/To Functions
### Pointers to functions

The pointers we have looked at so far have all been data pointers, pointers to functions (more often called function pointers) are very similar and share the same characteristics of other pointers but in place of pointing to a variable they point to functions. Creating an extra level of indirection, as a way to use the functional programming paradigm in C++, since it facilitates calling functions which are determined at runtime from the same piece of code. They allow passing a function around as parameter or return value in another function.
Using function pointers has exactly the same overhead as any other function call plus the additional pointer indirection and since the function to call is determined only at runtime, the compiler will typically not inline the function call as it could do anywhere else. Because of this characteristics, using function pointers may add up to be significantly slower than using regular function calls, and be avoided as a way to gain performance.
To declare a pointer to a function naively, the name of the pointer must be parenthesized, otherwise a function returning a pointer will be declared. You also have to declare the function's return type and its parameters. These must be exact!
Consider:
The function to be referenced must obviously have the same return type and the same parameter type as that of the pointer to function. The address of the function can be assigned just by using its name, optionally prefixed with the address-of operator &. Calling the function can be done by using either ptof(<value>) or (*ptof)(<value>).
So:
A function returning a float can't be pointed to by a pointer returning a double. If two names are identical (such as int and signed, or a typedef name), then the conversion is allowed. Otherwise, they must be entirely the same. You define the pointer by grouping the * with the variable name as you would any other pointer. The problem is that it might get interpreted as a return type instead.
It is often clearer to use a typedef for function pointer types; this also provides a place to give a meaningful name to the function pointer's type:
To help reduce confusion, it is popular to typedef either the function type or the pointer type:
If you typedef the function type, you can declare, but not define, functions with that type. If you typdef the pointer type, you cannot either declare or define functions with that type. Which to use is a matter of style (although the pointer is more popular).
To assign a pointer to a function, you simply assign it to the function name. The & operator is optional (it's not ambiguous). The compiler will automatically select an overloaded version of the function appropriate to the pointer, if one exists:
Using a pointer to a function is even simpler - you simply call it like you would a function. You are allowed to dereference it using the * operator, but you don't have to:
# Two Knights Defence:Fritz variation

6 c3. White attacks the Central Black Knight.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nd4 6.c3
| | 6 | 7 |
| 1 | c3 Nf5 | - - |
| 2 | .. b5 | Bf1 - |

## Estimated next move likelihood

b5 96%, Nf5 4%
When contributing to this Wikibook, please follow the Conventions for organization.
# Two Knights Defence:Fritz variation

8... Qh4 Attacking the White Knight and building a Kingside advantage. A complex position.

# Theory Table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1! Nd4 7.c3 Nxd5 8.Ne4 Qh4
| 9 | 10 | 11 | 12 |
| Ng3 Bg4 | f3 e4 | cxd4 Bd6 | Bxb5+ Kd8 |

## Estimated next move likelihood

Ng3 100%
When contributing to this Wikibook, please follow the Conventions for organization.
# Two Knights Defence:Fritz variation

7 Bf1.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nd4 6.c3 b5 7.Bf1
* 7
* Bf1 Nxd5
When contributing to this Wikibook, please follow the Conventions for organization.
# Two Knights Defence:Fritz variation

9 Ng3 The Knight comes to add protection against the Black Queen. Black's Knight on d4 is now vulnerable, but Black having more development can aggressively create threats. The choice is to move the d4 Knight or create further complications, for a long time 9...Bg4 was consider good but later analysis has indicated that with correct play White has a clear plus.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1 Nd4 7.c3 Nxd5 8.Ne4 Qh4
| 9 | 10 | 11 | 12 |
| Ng3 Nc6 | Bxb5 Bb7 | O-O O-O-O | | ∞ |
| ... Ne6 | Bxb5 Kd8 | d4 Bb7 | dxe5 Kc8 | +/- |
| ... Bb7 | cxd4 O-O-O | Be2 Nf4 | O-O Rxd4 | +/- |
| ... Bg4 | f3 e4 | cxd4 Bd6 | Bxb5+ Kd8 | +/- |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
# Two Knights Defence:Fritz variation
### 9. f3

Forced, no undefended squares for the White Queen to go to and 9. Be2 would lose a piece to 9...Nxe2 with threat of Nf4 and Ne2 or Nd3 mate.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1! Nd4 7.c3 Nxd5 8.Ne4 Qh4 9. Ng3 Bg4
| | 10 | 11 | 12 |
| 1 | f3 e4 | cxd4 Bd6 | Bxb5+ Kd8 |
| 2 | f3 Bd6 | cxd4 e4 | | Transposes to above line |
When contributing to this Wikibook, please follow the Conventions for organization.
# Two Knights Defence:Fritz variation

5 ... Nd4 The Fritz Variation of the Two Knights. This move put the Knight in a central position and can lead to a number of tactical possibilities, however the Knight is always vulnerable to being attacked by a c3 pawn and then having few squares to retreat so the Knight is often exchanged or sacrificed.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nd4
| | 5 | 6 | 7 |
| 1 | ... Nd4 | Nc3 h6 | Nf3 Bg4 | ∞ |
| 2 | ... ... | d6? Qxd6 | Bxf7+ Ke7 | ∞ |
| 3 | ... ... | c3 b5 | Bf1 Nxd5 | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
# Two Knights Defence:Fritz variation

6 ... b5. Position can also arise from the Ulvestad Variation

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nd4 6.c3 b5
| | 6 | 7 | 8 | 9 |
| 1 | ... b5 | Bd3 - |
| 2 | ... ... | cxd4 bxc4 | dxe5 Qxd5 | O-O Bb7 |
| 3 | ... ... | Bf1 - |

## Estimated next move likelihood

Bf1 90%, cxd4 8%, Bd3 2%
When contributing to this Wikibook, please follow the Conventions for organization.
# Two Knights Defence:Fritz variation

7. ... Nxd5 Takes back a pawn and attacks the White Knight on g5.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
This position can be reached by 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1 Nd4 7.c3 Nxd5 or 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 Nd4 6.c3 b5 7.Bf1 Nxd5
| 7 | 8 | 9 | 10 | 11 |
| ... Nxd5 | cxd4 Qxg5 | Bxb5+ Kd8 | Qf3 Bb7 | O-O Rb8 | ∞ |
| ... ... | Ne4 Qh4 | Ng3 Nc6 | | | ∞ |
| ... ... | h4 h6 | | - - | - - | ∞ |
| ... ... | Nxf7 Kxf7 | cxd4 exd4 | Bxb5+ Qe7+ | Qe2 Qxe2+ | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
# Two Knights Defence:Fritz variation

8. Ne4. A testing move. Now Black's Knight on d4 is at risk while the White Knight aids to the defence of the King side.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1! Nd4 7.c3 Nxd5 8.Ne4
| 8 | 9 | 10 |
| ... Qh4 | Ng3 Nc6 | | ∞ |
| Ne4 Ne6 | Bxb5+ Bd7 | Bxd7+ Qxd7 | +/= |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
# Two Knights Defence:Fritz variation

9 ... Bg4 Attacking the White Queen. A slightly startling move as after 10. f3 Black has two piece hanging.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5 b5 6.Bf1! Nd4 7.c3 Nxd5 8.Ne4 Qh4 9. Ng3 Bg4
| 10 | 11 | 12 |
| f3 e4 | cxd4 Bd6 | Bxb5+ Kd8 |
When contributing to this Wikibook, please follow the Conventions for organization.
# C Programming/math.h/acos

The acos function (which stands for arc cosine) is defined in math.h. It accepts a variable, returns the arc cosine value of the variable. This function expects the values in the range of -1 to 1 and values are returned in the range 0 to PI (3.1415927). It prints NAN if a value greater than 1 is passed.

## Syntax

    float acos(float x);

## Parameters

Floating point value whose arc cosine value has to be returned.

## Returns

Floating point value (arc cosine value of variable).

## References

* The C Programming Language, Second Edition, By Brian W. Kernighan and Dennis M. Ritchie, Page no. 251
* Programming With C, Second Edition, By Gottfried, Page no 487

## External Links

* acos at cplusplus
* acos at en.cppreference.com
* ACOS at idlastro.gsfc.nasa.gov
# C Programming/math.h/ldexp

In computing, ldexp is a function that multiplies a double precision floating point value by a specified integral power of two, returning the result if it is a valid floating point value for the representation used for double precision floating point values in the execution environment.

## Location

It is one of the C programming language's math library routines and is declared in the header file math.h.

## Definition

The function ldexp is defined in the C programming language standard, ISO/IEC 9899 as follows:
   7.12.6.6 The ldexp functions Synopsis
   Description The ldexp functions multiply a floating-point number by an integral power of 2. A range error may occur.
   Returns The ldexp functions return x*2$^{exp}$
The Open Group Single Unix Specification expands on the interface definition for ldexp in a Unix$^{tm}$ hosted environment.
    The Description section has the following additional information:
       An application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if errno is non-zero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred.
    The "Returns" section is expanded with the following clauses:
       If these functions would cause overflow, a range error must occur and ldexp, ldexpf, and ldexpl must return ±HUGE_VAL, ±HUGE_VALF, and ±HUGE_VALL (according to the sign of x), respectively.
       If the correct value would cause underflow, and is not representable, a range error may occur, and either 0.0 (if supported), or an implementation-defined value must be returned.
       If x is NaN, a NaN must be returned.
       If x is ±0 or ±Inf, x must be returned.
       If exp is 0, x must be returned.
       If the correct value would cause underflow, and is representable, a range error may occur and the correct value must be returned.
    It also adds an "Errors section", as follows:
       These functions must fail if:
          Range Error
             The result overflows.
                If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno must be set to [ERANGE]. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the overflow floating-point exception must be raised.

## Implementation

For binary exponent based floating point representations such as IEEE 754, ldexp can be implemented by simply extracting the exponent from the value of x and adding exp to it and if the result is within the valid exponent values for the representation, replacing x's exponent with the result. If the calculated exponent value is too high the function returns +∞ or -∞ (depending on the sign of x), and if the value is too low, the function returns 0.0.

## References

* ↑ ISO/IEC 9899 Standard for the C Programming Language
* ↑ Open Group Base Specifications Issue 6, ldexp definition

## External links

* ISO/IEC 9899 Standard for the C Programming Language
* IEEE Std 1003.1-2001 (POSIX.1)
* Open Group Base Specifications Issue 6
# C Programming/math.h/log
## Logarithmic function in 'c' language

these functions are under math.h. In general log(x) i.e ln(x) and log10(x) these are two types of logarithm.In C language function is available for both of these. so that we can use mathematical terms effectively. log(x) is natural logarithm. log10 is base 10.

### 1.log/ln
#### return value

return the natural logarithm of x. The natural logarithm is the base-e logarithm, the inverse of the natural exponential function.

### log10
#### Return value'

compute common logarithm and return the common(base - 10) logarithm of x, where x>0.

#### example program
## Notes

* cpluspluse, cpluspluse. "math:log". cplusplus. cplusplus. Retrieved 30/9/2011. {{cite web}}: Check date values in: |accessdate= (help)
# C Programming/math.h/modf

modf is the c reference function, this function breaks number or value into its fractional and integral parts, these parts have same sign as their argument.

## Variants

In C, the function prototype of the modf function look like following:
# C Programming/locale.h

In computing, locale.h is a C programming language header file, used for purposes of localization. The header provides two key functions: localeconv and setlocale. The former provides access to the current locale, while the latter allows one to set the current locale. The header also defines the struct lconv, which stores information about a given locale, including the local preference for the display of numbers and currency.

## Description
### setlocale function

The setlocale function is used to set or query the program's current locale.
If locale is not NULL, the program's current locale is modified according to the arguments. The argument category determines which parts of the program's current locale should be modified.
If locale is NULL, the current locale is only queried, not modified.

### localeconv function

The localeconv function returns a pointer to a struct lconv for the current locale. This structure is shown in next section below, and contains all values associated with the locale categories LC_NUMERIC and LC_MONETARY. Programs may also use the functions printf and strfmon, which behave according to the actual locale in use.

### lconv struct

The struct lconv contains the following fields:

#### Numeric (nonmonetary) information

Radix character.
Separator for digit groups to left of radix character.
Each element is the number of digits in a group; elements with higher indices are further left. An element with value CHAR_MAX means that no further grouping is done. An element with value 0 means that the previous element is used for all groups further left.

#### Monetary information

First three chars are a currency symbol from ISO 4217. Fourth char is the separator. Fifth char is '\0'.
Local currency symbol.
Like decimal_point above.
Like thousands_sep above.
Like grouping above.
Sign for positive values.
Sign for negative values.
International fractional digits.
Local fractional digits.
1 if currency_symbol precedes a positive value, 0 if succeeds.
1 if a space separates currency_symbol from a positive value.
1 if currency_symbol precedes a negative value, 0 if succeeds.
1 if a space separates currency_symbol from a negative value.
Positive and negative sign positions:
* 0: Parentheses surround the quantity and currency_symbol.
* 1: The sign string precedes the quantity and currency_symbol.
* 2: The sign string succeeds the quantity and currency_symbol.
* 3: The sign string immediately precedes the currency_symbol.
* 4: The sign string immediately succeeds the currency_symbol.

## References

* locale.h by OpenGroup
* localeconv by OpenGroup
* setlocale by OpenGroup
# C Programming/math.h/frexp
## frexp

We used frexp in mathematical purpose.The frexp is function which break the floating point value into two part. First in mantissa and second in exponent.We can express x as floating point value, m as mantissa and n as exponent. In frexp, the range of mantissa is always between 0.5 to 1.

## Format

    double frexp(double x, int *exppr);
    float frexpf(float x, int *exppr);
    long double frexpl(long double x, int *exppr);

## Return value

The frexp function return mantissa.The exppr pointed to the location where exponent is stored. x=mantissa*2exponent

## References

* Title frexp
* frexp-c reference
# C Programming/math.h/atan

atan is a function in math.h. It computes arc tangent. It returns the principal value of the arc tangent of x, expressed in radians. In trigonometrics, arc tangent is the inverse operation of tangent. Note that because of sign ambiguity, function cannot determine in which quadrant the angle falls only by its tangent value. To determine quadrant, we can use atan2. Return value of this function is principal arc tangent of x, in the interval [-pi/2,+pi/2] radians.

## Syntax

Here, x is Floating point value.

## Output

The arc tangent of 1.000000 is 45.000000 degrees.

## References

* ↑ ISO/IEC 9899:1999 specification (PDF). p. 231, § 7.12.4.3.

## External links

* C++ reference for std::atan
# C Programming/math.h/labs

In C language the function labs is included in header file stdlib.h. The abs function computes and returns the absolute value of the integer argument i. The labs function computes and returns the absolute value of the long integer argument, of the appropriate long integer type for the function. The llabs function computes and returns the absolute value of long long integer argument.

## Description

The labs is a library function. It is used under #include<stdlib.h> header file. This function computes the absolute value of the long integer argument i. It also returns the absolute value of the argument. That is, if i is negative, the result is opposite of i, but if i is non-negative the result is i.

## Required header files

* include<stdio.h>
* include<stdlib.h>

## Syntax

* include<stdlib.h>
long int labs(long int i);

## References

http://cplusplus.com/reference/clibrary/cstdlib/labs/ http://linux.die.net/man/3/labs