You are switching the terms x3 and x1. x3 – x1 = -(x1 – x3). In other words, A – B vs. B – A; if one is positive, the other must be negative.

On Tue, Jan 25, 2022 at 2:06 AM Math for Mere Mortals wrote:

>

]]>Hi Kintaar

– I have ported your code (quick and dirty for ranges, not arrays) to Google Sheets Scripts. It appears to work as expected.I go by beananimal I can be reached at gmail if you have any interest in my port. Thank you again for the great site and work.

Google Apps Scripts is a subset of JavaScript extended for Sheets. Almost everything from JS is there along with most of the spreadsheet functions. I started to convert the code but am not comfortable enough with the mathematical concepts to efficiently do the conversion without a lot of trial, error and frustration. This small site is a wonderful resource – thank you for the well thought out and implemented explanations and work.

]]>Not a bad idea! I will have to check on the scripting language to see what it can do.

On Wed, Aug 4, 2021 at 10:22 AM Math for Mere Mortals wrote:

>

]]>Tank you!!!

]]>The x range is in columns and the y range is in rows. There is no need to constrain them to the same domain, but they do need to be in ascending or descending order. If they are out of order or if any input points are outside of the output domains, that will interfere with the interpolation algorithms. See the examples and try to change the first or last output coordinates to extend them outward. They should allow that without causing an error.

On Wed, Mar 20, 2019 at 5:50 AM Math for Mere Mortals wrote:

>

]]>Unfortunately, the X and the Y column must have exactly the same range that is to say the same min and the same max value.

]]>