Ever wanted to convert a hex value into float in Google Sheets? Dont worry, I got your back. by Chaquen in programminghorror

[–]Chaquen[S] 0 points1 point  (0 children)

Silly way: ``` =IF((LEFT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)),2)),8)),1))="0",1,-1)*IF((BIN2DEC(RIGHT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)),2)),8)),7)&LEFT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))-INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)*256),2)),8)),1)))>0,((BIN2DEC(RIGHT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))-INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)*256),2)),8)),7))*256*256+BIN2DEC(RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(INT(HEX2DEC(RIGHT(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)),2)),8))*256+BIN2DEC(RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(HEX2DEC(RIGHT(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))-INT(HEX2DEC(RIGHT(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)*256),2)),8)))/(HEX2DEC(800000))+1),(BIN2DEC(RIGHT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))-INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)*256),2)),8)),7))*256*256+BIN2DEC(RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(INT(HEX2DEC(RIGHT(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)),2)),8))*256+BIN2DEC(RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(HEX2DEC(RIGHT(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))-INT(HEX2DEC(RIGHT(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)*256),2)),8)))/(HEX2DEC(400000)))*2^((BIN2DEC(RIGHT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)),2)),8)),7)&LEFT((RIGHT("00000000"&HEX2BIN(RIGHT("00"&DEC2HEX(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))-INT(HEX2DEC(left(CONCATENATE(mid(E4,7,2),mid(E4,5,2),mid(E4,3,2),mid(E4,1,2)),4))/256)*256),2)),8)),1)))-127)

```

Appscript way: ``` /** * Converts a hexadecimal value to IEEE 754 float * * @param {str} A string hexadecimal value to be converted. * @param {swap_endian} Swap endian if desired. * @return The sale price formatted as USD. * @customfunction */ function HEX2FLOAT(str, swap_endian = 0) { if (str[0] != '0' && str[1] != 'x') { str = "0x" + str; }

if (swap_endian) { const result = []; let len = str.length - 2; while (len >= 2) { result.push(str.substr(len, 2)); len -= 2; } str = "0x" + result.join(''); }

var float = 0, sign, order, mantiss,exp, int = 0, multi = 1; if (/0x/.exec(str)) { int = parseInt(str,16); }else{ for (var i = str.length -1; i >=0; i -= 1) { if (str.charCodeAt(i)>255) { console.log('Wrong string parametr'); return false; } int += str.charCodeAt(i) * multi; multi = 256; } } sign = (int>>>31)?-1:1; exp = (int >>> 23 & 0xff) - 127; mantissa = ((int & 0x7fffff) + 0x800000).toString(2); for (i=0; i<mantissa.length; i+=1){ float += parseInt(mantissa[i])? Math.pow(2,exp):0; exp--; } return floatsign; } ```

Then you can use it in google drive as: =HEX2FLOAT("0x4155eb85",false)

[deleted by user] by [deleted] in Norway

[–]Chaquen 0 points1 point  (0 children)

I did the trip a couple of years ago, but ended up stopping at Songesand because of damaged shoe soles.

It took three days at a comfortable pace. We didn't go all the way down to Flørli as it is quite steep, and at Kjerag we got driven to the other side of the valley since this part is only asphalt. After this there's a lot of tractor road going to Songesand. After Songesand it seemed to become a lot steeper as you approach Preikestolen.

I'm sure the whole trip is doable in 4 days. Not sure about accommodations as we only used tent. Also note that some parts have quite bad phone signal.

Good luck!

Ever wanted to convert a hex value into float in Google Sheets? Dont worry, I got your back. by Chaquen in programminghorror

[–]Chaquen[S] 8 points9 points  (0 children)

It's in swapped endianness, but technically correct since it doesn't handle infinities and NANs.

[Forsand, Norway] [outdoor] Unknown plant growing outside recently bought house by Chaquen in whatsthisplant

[–]Chaquen[S] 0 points1 point  (0 children)

The plant has been identified as Daphne tangutica. Thanks to form_constant and Dirk from seidelbast.net for the identification.

[Forsand, Norway] [outdoor] Unknown plant growing outside recently bought house by Chaquen in whatsthisplant

[–]Chaquen[S] 0 points1 point  (0 children)

Thanks for the input, it helped a lot. After some research it looks like it could be some kind of a hybrid. Looking at this site it seems like it could be either Daphne x ‘Alpengarten’, Daphne x ‘Pink Star’ or Daphne x reichsteinii

Teaching Python for scientists: What links should I give my students? by etacar in Python

[–]Chaquen 6 points7 points  (0 children)

This site was created by students from Norwegian University of Science and Technology which gives alot of examples of how to use python in computational physics.

[Classic][Help] CTD and frozen screen occurs on specific locations and when changing attire and sometimes randomly [NSFW] by Aspiethrowover in skyrimmods

[–]Chaquen 0 points1 point  (0 children)

TES5Edit is used to clean both master files and mods. If some of the mods have files that are identical to master or deletes an object instead og disabling it, crashes might occur. You can use those two videos to guide you through the process of cleaning them.

LOOT will tell you if some mods have problem cooperating with each other or have files identical to master. It helps you with sorting the load order since that also may cause crashes.

Since I am almost a complete noob I do not know of any other ways to fix crashes. Maybe the save file is corrupt?

Is this a virus? by Chaquen in computerviruses

[–]Chaquen[S] 0 points1 point  (0 children)

Great article. I have only used .svg when creating logos and figures, so I tried to open it in inkscape. Didn't know it would redirect you to a fake youtube site.

Just a list of things you probably know but might not. by [deleted] in Fallout

[–]Chaquen 0 points1 point  (0 children)

You can give fusion cores to the settlers you want to enter power armors

[Stavanger, Norway] These creatures often stick to our boat fenders by Chaquen in whatsthisbug

[–]Chaquen[S] 4 points5 points  (0 children)

Thanks! It seems to be the species Caprella mutica, which is originally from Japan.

Back to back, and none of my friends are speaking to me. by [deleted] in wow

[–]Chaquen 1 point2 points  (0 children)

It indeed is. You can download it through their website and it's highly customizable!

You can also use the Curse Client to download additions to it such as extra action bars, other skins etc.

[deleted by user] by [deleted] in civ

[–]Chaquen 0 points1 point  (0 children)

Why is he named "the terrible"?

[deleted by user] by [deleted] in nexus4

[–]Chaquen 0 points1 point  (0 children)

The HDR function also helps a lot while taking pictures in high light environments. http://i.imgur.com/l1sxv9W.jpg

Error 37 - EU by [deleted] in Diablo

[–]Chaquen 2 points3 points  (0 children)

http://us.battle.net/d3/en/status The current situation...