EMLでの足し算、つまりこうだね><
2+3は辛うじてできるけど、3+2をするとNaNになっちゃうの不思議・・・><

フォロー

テキスト版>< 

private static double AdditionByEmlRaw(double x, double y)
{
return eml(1, eml(eml(1, eml(eml(1, eml(eml(eml(1, eml(eml(1, eml(1, eml(x, 1))), 1)), eml(1, eml(eml(1, eml(eml(y, 1), 1)), 1))), 1)), 1)), 1));
}

//eml(x, y) = exp(x) - ln(y)
public static double eml(double x, double y)
{
return Math.Exp(x) - Math.Log(y);
}

テキスト版のeml掛け算>< 

private static double MultiplicationByEml(double x, double y)
{
return eml(eml(1, eml(eml(eml(1, eml(eml(1, eml(1, x)), 1)), eml(1, eml(eml(1, eml(y, 1)), 1))), 1)), 1);
}

ログインして会話に参加
:realtek:

思考の /dev/null