# GNU Astronomy Utilities - Tasks: task #13867, Infix notation for ImageArithmetic

You are not allowed to post comments on this tracker with your current authentication level.

*task #13867*: Infix notation for ImageArithmetic

Submitter: | Mohammad Akhlaghi <makhlaghi> | ||

Submitted: | Tue 26 Jan 2016 06:24:28 AM UTC | ||

Should Start On: | Mon 25 Jan 2016 03:00:00 PM UTC | Should be Finished on: | Mon 25 Jan 2016 03:00:00 PM UTC |

Category: | Arithmetic | Priority: | 5 - Normal |

Item Group: | Enhancement | Status: | Postponed |

Privacy: | Public | Percent Complete: | 0% |

Assigned to: | None | Open/Closed: | Open |

Effort: | 0.00 |

( Jump to the original submission )

Mon 30 Mar 2020 11:32:14 AM UTC, comment #6: |
Mohammad Akhlaghi <makhlaghi> |

Mon 30 Mar 2020 11:29:05 AM UTC, comment #5: I mean the order in which operations are executed.
In infix expressions, the operator precedence is required to resolve ambiguities. Operator Precedence is just like BDMAS rule of mathematics.
I have seen the reverse polish operations in arithmetic. It takes input of arithmeticparams and gal_list_str_t contains all the tokens. |
Kartik Ohri <lucifer13> |

Mon 30 Mar 2020 11:19:51 AM UTC, comment #4: I don't really understand what you mean by "precedence order of all operators". Please be more elaborate! Did you look at how the reverse polish operation is managed in Arithmetic? Your function should have similar inputs ;-). |
Mohammad Akhlaghi <makhlaghi> |

Mon 30 Mar 2020 07:20:31 AM UTC, comment #3: To implement the algorithm, we need a precedence order of all operators. Is there an order already defined or should I define one ? If I have to define one, what things to keep in mind? |
Kartik Ohri <lucifer13> |

Sun 29 Mar 2020 12:45:27 AM UTC, comment #2: If you have the time, that would be great ;-)!
Yes, its best to avoid library technicalities and start with a simple C source. Once it works nicely, you can put it into Gnuastro. Just look at the existing parsing methodology and write your library so the inputs are the same. |
Mohammad Akhlaghi <makhlaghi> |

Sat 28 Mar 2020 09:14:55 PM UTC, comment #1: While my copyright forms are being processed and till you are able to review the work on units library, can I work on this ? Also, should I begin with a similar approach first write an independent C file to convert infix notation to postfix and then proceed with integrating it in the library ? |
Kartik Ohri <lucifer13> |

Tue 26 Jan 2016 06:24:28 AM UTC, original submission:
In http://en.wikipedia.org/wiki/Shunting-yard_algorithm
There is a very nice explanation with a full program here:
http://en.literateprograms.org/Shunting_yard_algorithm_%28C%29 |
Mohammad Akhlaghi <makhlaghi> |

No files currently attached

Depends on the following items: None found

Items that depend on this one: None found

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

As you say, this is a feature of the infix notation, so it doesn't yet exist ;-).

Currently Arithmetic only works in reverse polish notation and only has the tools for that. Its up to you to define it for your implementation of the infix notation ;-).