Passing HX711 ADC data to the BigNumbers library

Hey everyone, thanks for your time

I have been trying to pass a variable to the "big numbers " function and am not having any luck. any help would be amazing.

The data i am gathering is from the hx711 adc and i am trying to curve fit a temp sensor with this equation i made in excel where x is a value of around 8 million, hence the need for the big numbers library.
Y = 155,511,071,485,117*x - 306,849,359,092,260,000,000

i tried a few things from the multiplication example

  BigNumber a = "155511071485117";
  BigNumber b = "30684935909260000000";
  BigNumber c = scale.read(); // with and without quotes
  BigNumber d = a * c - b ;

then making a string and passing the string

tempString = string(scale.read(), DEC); 


  BigNumber a = "155511071485117";
  BigNumber b = "30684935909260000000";
  BigNumber c = tempString; // with and without quotes
  BigNumber d = a * c - b;

again with no luck.
when i plug a raw number in with quotes it works as expected but i need to pass the variable

any ideas on how to do this?
Thanks everyone

Clearly the BigNumber constructor expects a string as input. Passing it a String was a waste of time and effort. Populate a string using itoa() or sprintf() and banish the idea of using Strings completely from your toolkit.

im new to string manipulation and am messing up something on sprintf.

i tried this example i found online and got it to work successfully however when i tried to use my input i got junk, the sprintf seems to be only using int when i need long

here is the serial output

-3396672823377925514 (math performed, so the big number function is working)
8432302 (raw data so the scale is working)
-00021842 (sprintf output..... this is the problem)

13:02:00

// BigNumber test: multiplication
#include "BigNumber.h"
#include "HX711.h"
HX711 scale(A0, A1);

void setup ()
{
  Serial.begin (115200);
  BigNumber::begin ();
 

  long rawTemp= scale.read();
  char temp [128] = "";
  
  
  sprintf(temp, "%09d", rawTemp);
  // test multiplication  
  BigNumber a = "155511071485117";
  BigNumber b = "30684935909260000000";
  
  BigNumber d = a * temp ;
  
  Serial.println (d);
  Serial.println (rawTemp);
  Serial.println (temp);
  

  
  int hour=13;
  int min=2;
  int sec=0;
  char test[9]="";
  sprintf(test, "%02d:%02d:%02d", hour, min, sec);
  Serial.println ("");
  Serial.println (test);


}  // end of setup

void loop () { }
[code/]


thanks again
  long rawTemp= scale.read();
  char temp [128] = "";
 
 
  sprintf(temp, "%09d", rawTemp);

Why do you need a 128 element array to hold a value that is going to have 9 characters?

Why on earth are you insisting on leading 0's in the output?

Why are you using d as the format specifier? d is for ints, not longs.

-00021842 (sprintf output..... this is the problem)

Your incorrect code explains that.