edwig / BCD

Binary Coded Decimal. Research project for use with SQL_NUMERIC_STRUCT datatype
MIT License
12 stars 1 forks source link

0.0 is not handled correctly boolean < #2

Closed sisirajaya closed 4 years ago

sisirajaya commented 4 years ago

When the Taylor series is evaluated for functions such as sine arcsine tan arcTan the comparison to epsilon does not get evaluated correctly when number is 0.0 in bcd . Therefore, it goes into a infinite loop.

 if (between.AbsoluteValue() < epsilon)
  {
     break;
  }
edwig commented 4 years ago

Hi Sisirajaya,

Just commited the fix.

Edwig

Van: sisirajaya notifications@github.com Verzonden: dinsdag 3 maart 2020 17:45 Aan: edwig/BCD BCD@noreply.github.com CC: Subscribed subscribed@noreply.github.com Onderwerp: [edwig/BCD] 0.0 is not handled correctly boolean < (#2)

When the Taylor series is evaluated for functions such as sine arcsine tan arcTan the comparison to epsilon does not get evaluated correctly when number is 0.0 in bcd . Therefore, it goes into a infinite loop.

if (between.AbsoluteValue() < epsilon) { break; }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/edwig/BCD/issues/2?email_source=notifications&email_token=ABFDS34EOOMVEPIKBORYECLRFUXYJA5CNFSM4LAOPWD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISCXXJA , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFDS3Z7HZDEQT7MTBOORJDRFUXYJANCNFSM4LAOPWDQ . https://github.com/notifications/beacon/ABFDS3ZSZ7OCAANQNBHAEALRFUXYJA5CNFSM4LAOPWD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISCXXJA.gif

sisirajaya commented 4 years ago

Thank you I will download and try it. I just had it to return 0 if the number is 0.0

Get Outlook for iOShttps://aka.ms/o0ukef


From: Edwig Huisman notifications@github.com Sent: Tuesday, March 3, 2020 1:32:18 PM To: edwig/BCD BCD@noreply.github.com Cc: sisirajaya sisirajaya@gmail.com; Author author@noreply.github.com Subject: Re: [edwig/BCD] 0.0 is not handled correctly boolean < (#2)

Hi Sisirajaya,

Just commited the fix.

Edwig

Van: sisirajaya notifications@github.com Verzonden: dinsdag 3 maart 2020 17:45 Aan: edwig/BCD BCD@noreply.github.com CC: Subscribed subscribed@noreply.github.com Onderwerp: [edwig/BCD] 0.0 is not handled correctly boolean < (#2)

When the Taylor series is evaluated for functions such as sine arcsine tan arcTan the comparison to epsilon does not get evaluated correctly when number is 0.0 in bcd . Therefore, it goes into a infinite loop.

if (between.AbsoluteValue() < epsilon) { break; }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/edwig/BCD/issues/2?email_source=notifications&email_token=ABFDS34EOOMVEPIKBORYECLRFUXYJA5CNFSM4LAOPWD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISCXXJA , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFDS3Z7HZDEQT7MTBOORJDRFUXYJANCNFSM4LAOPWDQ . https://github.com/notifications/beacon/ABFDS3ZSZ7OCAANQNBHAEALRFUXYJA5CNFSM4LAOPWD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISCXXJA.gif

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/edwig/BCD/issues/2?email_source=notifications&email_token=AACPAWRIBPDRACM2OMWJLUTRFVLMFA5CNFSM4LAOPWD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENU2WAQ#issuecomment-594127618, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AACPAWRJF7CPHVZOH7HJK7DRFVLMFANCNFSM4LAOPWDQ.