Skip to content

Fixes #6280 : Added right associativity to 'pow' function - #6314

Merged
ridiculousfish merged 1 commit into
fish-shell:masterfrom
ankush-0x90:add_right_associativity_to_pow
Nov 13, 2019
Merged

ridiculousfish merged 1 commit into
fish-shell:masterfrom
ankush-0x90:add_right_associativity_to_pow

Conversation

@ankush-0x90

@ankush-0x90 ankush-0x90 commented Nov 12, 2019 •

Copy link
Copy Markdown
Contributor

Description

The pow function considered to be left associative

Talk about your changes here.
After comparing with upstream I have added a constant variable which determines the associativity at run time

Fixes issue #6280

TODOs:

I am first time contributor to this awesome project so please guide me through this..

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

Comment thread src/tinyexpr.cpp Outdated
* For a^b^c = a^(b^c) do nothing
* For a^b^c = (a^b)^c comment the next line.
*/
#define TE_POW_FROM_RIGHT

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please just remove the option entirely. This isn't a library anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Means just want only one version of pow? and I will squash changes..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done @faho :) Please check if that was expected sorry I hard pushed two times and amended changes with last commit

@faho faho added this to the fish 3.1.0 milestone Nov 13, 2019
@faho faho added bug Something that's not working as intended good first issue labels Nov 13, 2019
@faho

faho commented Nov 13, 2019

Copy link
Copy Markdown
Member

It'd be nice to have some tests for this - we don't want to accidentally go back.

See tests/checks/math.fish.

@ridiculousfish
ridiculousfish merged commit ee982c4 into fish-shell:master Nov 13, 2019
@floam

floam commented Nov 15, 2019

Copy link
Copy Markdown
Member

Nice job!

@ankush-0x90
ankush-0x90 deleted the add_right_associativity_to_pow branch November 15, 2019 12:36
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something that's not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants