Log Base 2 Calculator

Software Defined Radios of all Types
User avatar
IB4TL
Member
Member
Reactions:
Posts: 5263
Joined: Mon Nov 05, 2018 6:02 pm

Log Base 2 Calculator

#1

Post by IB4TL »


This tool calculates the Logarithm base 2 of any number x.

function doValidate_2(form) { window['cff_enabling_form' ] = function(_form){ if(!(_form instanceof $dexQuery)) _form = $dexQuery(_form); _form.validate().settings.ignore = '.ignore,.ignorepb'; _form.removeData('being-submitted'); _form.find('.submitbtn-disabled').removeClass('submitbtn-disabled'); _form.find('.cff-processing-form').remove(); }; window['cff_disabling_form'] = function(_form){ if(!(_form instanceof $dexQuery)) _form = $dexQuery(_form); if(cff_form_disabled(_form)) return; _form.find('.pbSubmit').addClass('submitbtn-disabled'); _form.data('being-submitted',1); var d = document.createElement('div'); $dexQuery(d).addClass('cff-processing-form').appendTo(_form.find('#fbuilder')); }; window['cff_form_disabled' ] = function(_form){ if(!(_form instanceof $dexQuery)) _form = $dexQuery(_form); return ('undefined' != typeof _form.data('being-submitted')); }; var form_identifier = '_2'; if(typeof cpcff_validation_rules == 'undefined') cpcff_validation_rules = {}; if(typeof cpcff_validation_rules[form_identifier] == 'undefined') cpcff_validation_rules[form_identifier] = {}; var $dexQuery = (fbuilderjQuery) ? fbuilderjQuery : jQuery.noConflict(), _form = $dexQuery("#cp_calculatedfieldsf_pform"+form_identifier), form_disabled = function(){cff_form_disabled(_form);}, disabling_form = function(){cff_disabling_form(_form);}, enabling_form = function(){cff_enabling_form(_form);}; if(form_disabled()) return false; _form.validate().settings.ignore = '.ignore'; var cpefb_error = !_form.validate().checkForm(); var validation_rules = cpcff_validation_rules[form_identifier], processing_form = function() { for(var rule in validation_rules) { if(!validation_rules[rule]) return; } _form.find("[name$='_date'][type='hidden']").each(function(){ var v = $dexQuery(this).val(), name = $dexQuery(this).attr( 'name' ).replace('_date', ''), e = $dexQuery("[name='"+name+"']"); if( e.length ){ e.val( $dexQuery.trim( e.val().replace( v, '' ) ) ); } }); _form.find("select option[vt]").each(function(){ var e = $dexQuery(this); e.attr('cff-val-bk', e.val()).val(e.attr("vt")); }); _form.find("input[vt]").each(function(){ var e = $dexQuery(this); e.attr('cff-val-bk', e.val()).val(e.attr("vt")); }); _form.find('.cpcff-recordset,.cff-exclude :input,[id^="form_structure_"]') .add(_form.find( '.ignore' )).attr('cff-disabled', 1).prop('disabled', true); disabling_form(); _form[ 0 ].submit(); setTimeout(function(){ _form.find('[cff-val-bk]').each(function(){ var e = $dexQuery(this); e.val(e.attr('cff-val-bk')).removeAttr('cff-val-bk'); }); _form.find('[cff-disabled]').prop('disabled', false).removeAttr('cff-disabled'); if(!/^(\s*|_self|_top|_parent)$/i.test(_form.prop('target'))) { enabling_form(); } $dexQuery(document).trigger('cff-form-submitted', _form); }, 4000); }; _form.find('[name="cp_ref_page"]').val(document.location.href); validation_rules['fields_validation_error'] = (cpefb_error==0); /* 1: Do not submit if the equations are being evaluated */ validation_rules['no_pending'] = (!(form_identifier in $dexQuery.fbuilder.calculator.processing_queue) || !$dexQuery.fbuilder.calculator.processing_queue[form_identifier]) && !$dexQuery.fbuilder.calculator.thereIsPending(form_identifier); if(!validation_rules['no_pending']) { $dexQuery(document).on('equationsQueueEmpty', function(evt, formId){ if(formId == form_identifier) { $dexQuery(document).off('equationsQueueEmpty'); validation_rules['no_pending'] = true; processing_form(); } }); } /* End :1 */ if (validation_rules['fields_validation_error']) { processing_form(); } else { _form.valid(); var page = $dexQuery('.cpefb_error:not(.message):eq(0)').closest('.pbreak').attr('page')*1; gotopage(page, _form); enabling_form(); } return false; } form_structure_2=[[{"form_identifier":"","name":"fieldname2","shortlabel":"","index":0,"ftype":"fnumber","userhelp":"","audiotutorial":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"x","predefined":"1","predefinedClick":false,"required":false,"exclude":false,"readonly":false,"numberpad":false,"spinner":false,"size":"medium","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"dependencies":[{"rule":"","complex":false,"fields":[""]}],"form_identifier":"","name":"fieldname4","shortlabel":"","index":1,"ftype":"fCalculated","userhelp":"","audiotutorial":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"Log2(x)","predefined":"","required":false,"exclude":false,"size":"medium","eq":"log(fieldname2)\/log(2)","min":"","max":"","suffix":"","prefix":"","decimalsymbol":".","groupingsymbol":"","readonly":true,"currency":false,"noEvalIfManual":true,"formatDynamically":false,"hidefield":false,"fBuild":{},"parent":""}],{"0":{"title":"","description":"","formlayout":"top_aligned","formtemplate":"cp_cff_clean","evalequations":1,"evalequationsevent":2,"loading_animation":0,"autocomplete":1,"persistence":0,"animate_form":0,"customstyles":"","request_cost":"fieldname2"},"formid":"cp_calculatedfieldsf_pform_2","setCache":false,"cache":false}]; Payment options Formula y = Log2(x)
Background
The Logarithm base 2 of x = 2 is 1.

Below is a table of numbers and the Log2() values
xLog2(x)1021428316432564612872568




The post Log Base 2 Calculator appeared first on OneSDR - A Wireless Technology Blog.


Source: https://www.onesdr.com/log-base-2-calculator/
Chow
IB4TL

Return to “Software Defined Radios”

Who is online

Users browsing this forum: No registered users and 0 guests