abdulfatir / abdulfatir/jcomplexnumber

ComplexNumber.pow() doesn't work as expected for a negative power

オープン
#1 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
20
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

I have mathematical operation:
ComplexNumber cosSinPow=ComplexNumber.multiply(omega, ComplexNumber.pow(coSin, -k * j));

where:
k=8;
j=1;
omega=1.0+0.0i;
coSin=0.9917900138232462+0.127877161684506i;

Expected result: 0.51839256831052 -0.85514276300535 i
Current result: 0.9917900138232462+0.127877161684506i

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Look at the ComplexNumber.pow() method implementation, likely in the main library class. The issue shows a specific case where a negative exponent leads to an incorrect result. Start by writing a test with the provided numbers to reproduce the bug, then examine the power calculation logic for handling negative exponents. Check if the method correctly computes reciprocals or uses the polar form (magnitude and argument).

索引モデルが issue の本文から書いたものです。

評価

領域
backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。