Skip to content
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

Fixed negative inputs in Logarithmic Calculator #774

Merged
merged 1 commit into from
May 24, 2024

Conversation

Aarzookhunger
Copy link
Contributor

@Aarzookhunger Aarzookhunger commented May 19, 2024

Fixes Issue🛠️

Closes #630

Description👨‍💻

The base input while calculating the log should be positive and not 1. This issue has been fixed by inculcating the necessary changes in index.html file in the input tag and using validateBaseInput function.

Also the number whose log is being calculated should be positive which has been fixed on the similar lines by making changes in the input tag.

For more detailed information, review the changes made section.

Type of change📄

function validateBaseInput(base) {
	const errorElement = document.getElementById('baseError');
	if (base.value == 1) {
		errorElement.style.display = 'inline';
	} else {
		errorElement.style.display = 'none';
	}
}
  • Bug fix (non-breaking change which fixes an issue)

How this has been tested✅

Tested on my PC locally by entering the inputs that resulted in bug such as:-

  • 1 as the base input
  • negative number as base and the number input

The screenshot has been attached for the same which showcases that testing has been done and the code works fine as expected.

Checklist✅

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added demonstration in the form of GIF/video file
  • I am an Open Source Contributor

Screenshots/GIF📷

LogarithmBaseError

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Aarzookhunger, Welcome to the project CalcDiverse! 🎊
Thanks for your contribution! Your effort makes this project better. Keep it up! 🙌
Please wait for the PR to be reviewed. Happy Coding!! ✨

Copy link

netlify bot commented May 19, 2024

Deploy Preview for calcdiverse ready!

Name Link
🔨 Latest commit 3613dbc
🔍 Latest deploy log https://app.netlify.com/sites/calcdiverse/deploys/664a5de2be70b20008eaf1b2
😎 Deploy Preview https://deploy-preview-774--calcdiverse.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Aarzookhunger Aarzookhunger changed the title Bug : Fix negative input in Logarithm Calculator Fixed negative inputs in logarithmic calculator May 23, 2024
@Rakesh9100 Rakesh9100 changed the title Fixed negative inputs in logarithmic calculator Fixed negative inputs in Logarithmic Calculator May 24, 2024
@Rakesh9100 Rakesh9100 merged commit 94e52c9 into Rakesh9100:main May 24, 2024
5 checks passed
@Rakesh9100
Copy link
Owner

Congrats on getting your PR merged to the repo under GSSOC 2k24 🎉 @Aarzookhunger

@Rakesh9100 Rakesh9100 added Completed 🥳 PR successfully merged and issue resolved on completion gssoc GSSOC Open Source Program level2 Intermediate task labels May 24, 2024
@Aarzookhunger
Copy link
Contributor Author

@Rakesh9100
Thanks a lot sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Completed 🥳 PR successfully merged and issue resolved on completion gssoc GSSOC Open Source Program level2 Intermediate task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Fix negative inputs in Logarithm Calculator
2 participants