Opened 4 years ago

Closed 4 years ago

#4856 closed enhancement (fixed)

Handle atan2 with (0,0) input

Reported by: aramle Owned by: aramle
Priority: major Milestone: 2.0.x
Component: FMU/JMU runtime Version: trunk
Keywords: Cc:

Description

In C when atan2(0,0) is called the return value is 0. However, mathematically atan2(0,0) is not defined. Therefore it would be wise to introduce jmi_atan2 that handles the (0,0) input case with a nan as return.

Change History (6)

comment:1 Changed 4 years ago by aramle

r8575 Introduced jmi_atan2 in runtime.

comment:2 Changed 4 years ago by Jonathan Kämpe

changeset:8684

Updated code generation for atan2 to use jmi_atan2 runtime function

comment:3 Changed 4 years ago by aramle

Resolution: fixed
Status: newclosed

comment:4 Changed 4 years ago by aramle

Resolution: fixed
Status: closedreopened

comment:5 Changed 4 years ago by aramle

r8776 Removed return of Nan for atan2(0,0) to follow C stanndard.

comment:6 Changed 4 years ago by aramle

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.