Skip to content

[BUG] <Issue in Herons Formula> #4685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
satyabarghav opened this issue Oct 6, 2023 · 7 comments
Closed

[BUG] <Issue in Herons Formula> #4685

satyabarghav opened this issue Oct 6, 2023 · 7 comments
Assignees
Labels

Comments

@satyabarghav
Copy link
Contributor

satyabarghav commented Oct 6, 2023

Description

In the implementation of Herons Formula we have the signature of the function as Herons(int a, int b, int c) so when we call the function we are confined to only integer inputs and we will get the error when using sides of double or float data type

Excepted behavior

So we need to change the signature of the function to even work with data types of even double or float.

I have attached the error we get while calling the function with parameters of double data type.

Screenshots

image

@sourabhsahu33
Copy link

I want to interested to contribute can you assigned me.

@justharshal2023
Copy link

Hey i just got a solution for this issue in which a function need to work for various data types . Please Assign me this issue so that i can quickly solve this by Function Overloading.

justharshal2023 added a commit to justharshal2023/Java that referenced this issue Oct 6, 2023
Fixes TheAlgorithms#4685
-Changes:
1.herons formula parameters changed to double to calculate area
2.Added triangle validation condition

 I have read CONTRIBUTING.md.
 This pull request is all my own work -- I have not plagiarized it.
 All filenames are in PascalCase.
 All functions and variable names follow Java naming conventions.
 All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
@rohit162
Copy link

rohit162 commented Oct 6, 2023

Can you assign me this issue?

@justharshal2023
Copy link

Hey @satyabarghav if this issue is still unsolved then please feel free to assign me this issue i have already solved it in my fork using function overloading please check

@LakshmiSowmya04
Copy link

Hey @satyabarghav if this issue is still unsolved then please feel free to assign me this issue

@HimanshuMahto
Copy link

hey @satyabarghav can you assign me this issue

@vil02 vil02 assigned vil02 and satyabarghav and unassigned vil02 Oct 21, 2023
@vil02
Copy link
Member

vil02 commented Oct 23, 2023

Closed by #4686.

@vil02 vil02 closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants