Find Jobs
Hire Freelancers

Create Function to Transform a String Equation using PHP

$30-250 USD

In Progress
Posted almost 9 years ago

$30-250 USD

Paid on delivery
Using Standard PHP and probably regex or whatever you choose. I need an equation string (that would work in PHP if evaluated) to be transformed into an equation string that would work in MYSQL/HIVE. This transformation must be made possible with the use of a function that can be used for different equation strings. The input is the PHP string, the output is the MYSQL/HIVE string. I don't need anything else. The main differences between the php string and the MYSQL/HIVE strings are the min/max functions and any multiplication needs to be enclosed in a CAST function for HIVE to work. In the PHP formula, the min/max functions are like this: 'min(1e-5*variableA,5)' which should be transformed to this -> 'IF(1e-5*variableA < 5, 1e-5*variableA, 5)' OR if PHP: 'max(1e-5*variableA,5)' -> Transform to MYSQL/HIVE: 'IF(1e-5*variableA > 5, 1e-5*variableA, 5)' The PHP min/max functions will have inner min/max functions like in the main example, those should be transformed correctly so the IF statements are inside the outside IF statements. In the PHP formula, any multiplications have to transfomred into 'CAST( {multiplication statement} as DECIMAL (25,17))' where {multiplication statement} is something that is being multiplied using the '*' sign. Example: PHP: '1e-5*variableA + 8.10331166869353e-5*variableA' Transformed into MYSQL/HIVE: 'CAST( 1e-5*variableA as DECIMAL (25,17)) + CAST( 8.10331166869353e-5*variableA as DECIMAL (25,17))' Make sure to add any necessary parentheses to follow mathematical order of operations when you enclose the multiplications with CAST as DECIMAL I have attached a txt file with an example PHP input string and what the PHP Function should output as the transformed string. Also, If you could easily make the output string legible like in the main example that would be great too. Thanks
Project ID: 7852660

About the project

7 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
7 freelancers are bidding on average $289 USD for this job
User Avatar
Hello! With 98% to 99% completion rate, 800+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... you can never go wrong choosing me :) I look forward to your reply. Thanks. Kind Regards, Rajesh Soni
$631 USD in 3 days
4.9 (1009 reviews)
8.9
8.9
User Avatar
Hi I work towards providing reliable, relevant and robust IT solutions at most competitive prices to my customers. I ensure 100% customer satisfaction so lets start Thanks
$309 USD in 13 days
4.8 (468 reviews)
8.3
8.3
User Avatar
Hi I would like to participate in developing your project. I think I have experience in php projects. I have already developed several websites running on servers. You might have read this in my profile. Please accept my bid. Of course, I will do my best. Thanks in advance.
$206 USD in 3 days
5.0 (74 reviews)
7.6
7.6
User Avatar
I want to discuss this project with you further, let me know the best suitable time for you to schedule the meeting, Feel free to message me at any time, i used to be online 14 hrs in a day on this website so probably you will get a quick response from my end.
$309 USD in 10 days
4.8 (53 reviews)
7.1
7.1
User Avatar
Hello, I'm vijay patel and having more then 7+ year exp in PHP/Mysql programming. I have well grip on db design and sql/mysql formula and programming. I have done this type of tasks. Recently I completed one task like this convert distance php distance formula into mysql to increase speed in query result and site. ==== ex. calculate distance area within 1.5 mile SELECT *,( 3959 * acos ( cos ( radians(".$userLat.") ) * cos( radians( lat ) ) * cos( radians( log ) - radians(".$userLog.") ) + sin ( radians(".$userLat.") ) * sin( radians( lat ) ) ) ) AS distance FROM traffic_users HAVING distance <= 1.5 order by is_traffic_time desc === Thanks for giving full clarification in project detail, I think first para is enough to understand for the exp. programmer. by the way Thanks for it even thought I read the full detail and txt file and understood the task to apply formula in query string. I just want to make sure that "variableA" is input value and can you give me input, output sample so its help me to checking with different value. I'm very exited to do this job and complete it. Tomorrow here sunday so I think I can complete it within monday morning in next one day. Please not see ratting because of I have old account but starting to bid project and freelancing in these days. I hope you will give me chance to show my expertise. Thanks,
$123 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Owatonna, United States
5.0
6
Payment method verified
Member since Jul 29, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.